Skip to content
Snippets Groups Projects
Commit 3e052d5e authored by Edward Hicks's avatar Edward Hicks :8ball:
Browse files

split command into an array since run seems to want it that way instead

parent 65bf7ea4
Branches
No related tags found
No related merge requests found
Pipeline #92232 passed
......@@ -2,7 +2,6 @@
from __future__ import print_function
import sys
import os
from os import WEXITED, WSTOPPED, WNOWAIT, WNOHANG, WCONTINUED
import subprocess
import time
import argparse
......@@ -492,10 +491,12 @@ while True:
# Populate the command to run with the values provided
pid = os.fork()
if pid == 0:
proc = subprocess.run(command, shell=True)
proc = subprocess.run(command.split(' '), shell=True)
sys.exit(proc.returncode)
printLog("Forked '"+command+"' as "+str(pid), loglevels.INFO)
os.waitpid(pid, WEXITED | WSTOPPED)
# Wait for the subprocess to finish before launching any more
os.waitpid(pid, os.WEXITED | os.WSTOPPED)
except KeyError as e:
# No valid operation messages were found
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment