aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2011-03-15 15:24:43 -0400
committerGregory P. Smith <greg@krypto.org>2011-03-15 15:24:43 -0400
commit8f7724f9a4ec57d689a436a064e2e047b2ad0d97 (patch)
tree5a1f3b3b7d63cda96f9a8d18333a1ea4303ee5bd /Lib/webbrowser.py
parent#11554: reactivate test_email_codecs, and make it pass. (diff)
downloadcpython-8f7724f9a4ec57d689a436a064e2e047b2ad0d97.tar.gz
cpython-8f7724f9a4ec57d689a436a064e2e047b2ad0d97.tar.bz2
cpython-8f7724f9a4ec57d689a436a064e2e047b2ad0d97.zip
merge d71476b9a55d from tip, use start_new_session instead of os.setsid.
Diffstat (limited to 'Lib/webbrowser.py')
-rw-r--r--Lib/webbrowser.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index e369acb1df6..415f12ac5f3 100644
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -228,15 +228,9 @@ class UnixBrowser(BaseBrowser):
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.