mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
build.py: Change hung invocation to subprocess.Popen()
Pass an array to Popen(), shell=False, close_fds=True, stderr=None, this fixes a hung zombie child. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
67df75508a
commit
7bb67d062a
1 changed files with 3 additions and 2 deletions
|
|
@ -122,7 +122,8 @@ def calculate_order(order, modules, prereq_types):
|
|||
def run_make(module, target):
|
||||
global cur_project
|
||||
cur_project=cur_project+1
|
||||
make_cmd = "make " + target + " 2>&1"
|
||||
#make_cmd = "make " + target + " 2>&1"
|
||||
make_cmd = [ "make", target ]
|
||||
path = find_proj_path_cached(module)
|
||||
delim_len=120
|
||||
delim='---- %d/%d: running %s in %s -' % (cur_project, len(order), make_cmd, path)
|
||||
|
|
@ -130,7 +131,7 @@ def run_make(module, target):
|
|||
|
||||
print(',' + delim + ' >')
|
||||
os.chdir(path)
|
||||
p = subprocess.Popen(make_cmd, shell=True, stdout=subprocess.PIPE)
|
||||
p = subprocess.Popen(make_cmd, shell=False, stdout=subprocess.PIPE, stderr=None, close_fds=True)
|
||||
for line in iter(p.stdout.readline, ''):
|
||||
sys.stdout.write('| ' + line) # avoid extra newlines from print()
|
||||
sys.stdout.flush()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue