mirror of
https://github.com/python/cpython.git
synced 2026-03-06 04:50:58 +00:00
merge d71476b9a55d from tip, use start_new_session instead of os.setsid.
This commit is contained in:
parent
56a9d7e3da
commit
8f7724f9a4
1 changed files with 1 additions and 7 deletions
|
|
@ -228,15 +228,9 @@ def _invoke(self, args, remote, autoraise):
|
|||
else:
|
||||
# for TTY browsers, we need stdin/out
|
||||
inout = None
|
||||
# if possible, put browser in separate process group, so
|
||||
# keyboard interrupts don't affect browser as well as Python
|
||||
setsid = getattr(os, 'setsid', None)
|
||||
if not setsid:
|
||||
setsid = getattr(os, 'setpgrp', None)
|
||||
|
||||
p = subprocess.Popen(cmdline, close_fds=True, stdin=inout,
|
||||
stdout=(self.redirect_stdout and inout or None),
|
||||
stderr=inout, preexec_fn=setsid)
|
||||
stderr=inout, start_new_session=True)
|
||||
if remote:
|
||||
# wait five secons. If the subprocess is not finished, the
|
||||
# remote invocation has (hopefully) started a new instance.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue