2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-26 11:51:20 +01:00

No new processes needed on IronPython

This commit is contained in:
Thomas Nagy 2016-02-26 18:52:43 +01:00
parent 75e9735a22
commit d131a37ac9
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64

View File

@ -831,7 +831,7 @@ def get_process():
return get_process()
def run_process(cmd, kwargs, cargs={}):
if os.name == 'java' or not kwargs.get('stdout', None) or not kwargs.get('stderr', None):
if os.name == 'java' or sys.platform == 'cli' or not kwargs.get('stdout', None) or not kwargs.get('stderr', None):
proc = subprocess.Popen(cmd, **kwargs)
if kwargs.get('stdout', None) or kwargs.get('stderr', None):
out, err = proc.communicate(**cargs)
@ -842,7 +842,7 @@ def run_process(cmd, kwargs, cargs={}):
return status, out, err
else:
proc = get_process()
obj = base64.b64encode(cPickle.dumps([cmd, kwargs, cargs])) #.encode()
obj = base64.b64encode(cPickle.dumps([cmd, kwargs, cargs]))
proc.stdin.write(obj)
proc.stdin.write('\n'.encode())
proc.stdin.flush()