From: Gregory P. Smith Date: Tue, 15 Mar 2011 18:58:08 +0000 (-0400) Subject: Use start_new_session in the webbrowser module rather than a python os.setsid preeexe... X-Git-Tag: v3.3.0a1~2905^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5aaa498bad1b18864db7a6efe7ca977190187cc5;p=thirdparty%2FPython%2Fcpython.git Use start_new_session in the webbrowser module rather than a python os.setsid preeexec_fn. --- diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index e369acb1df64..415f12ac5f3f 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.