diff options
author | Gregory P. Smith <greg@krypto.org> | 2011-03-15 18:58:08 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2011-03-15 18:58:08 (GMT) |
commit | 5aaa498bad1b18864db7a6efe7ca977190187cc5 (patch) | |
tree | 5d866600adad1a3007b1ebb1fae8d9970b0a3a96 /Lib/webbrowser.py | |
parent | 8121898ec5a206367186bdaf7c9b13bebc28bf57 (diff) | |
download | cpython-5aaa498bad1b18864db7a6efe7ca977190187cc5.zip cpython-5aaa498bad1b18864db7a6efe7ca977190187cc5.tar.gz cpython-5aaa498bad1b18864db7a6efe7ca977190187cc5.tar.bz2 |
Use start_new_session in the webbrowser module rather than a python os.setsid preeexec_fn.
Diffstat (limited to 'Lib/webbrowser.py')
-rw-r--r-- | Lib/webbrowser.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index e369acb..415f12a 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. |