set sid only on posix

This commit is contained in:
Ehsan Azarnasab 2015-08-20 20:01:54 -07:00
parent 08fb925b34
commit acf61103b6

View File

@ -158,7 +158,7 @@ def run_process(cmds, timeout=None):
p = Popen(cmds,
stdout=PIPE, stderr=STDOUT,
bufsize=1,
close_fds=_ON_POSIX, preexec_fn=os.setsid)
close_fds=_ON_POSIX, preexec_fn=os.setsid if _ON_POSIX else None)
q = Queue()
t = Thread(target=enqueue_output, args=(p.stdout, q))