Fix multi-processing code to work with py2exe'd executables

This commit is contained in:
Kovid Goyal 2008-03-18 22:43:54 +00:00
parent 8cd1799ad9
commit fb805aa4ec

View File

@ -112,7 +112,11 @@ class Server(object):
cmd = prefix + 'from libprs500.parallel import run_job; run_job(\'%s\')'%binascii.hexlify(job_data)
if not monitor:
popen([python, '-c', cmd])
p = popen([python, '-c', cmd], stdout=subprocess.PIPE, stdin=subprocess.PIPE,
stderr=subprocess.PIPE)
p.stdout.close()
p.stdin.close()
p.stderr.close()
return
output = open(os.path.join(job_dir, 'output.txt'), 'wb')