]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
merge d71476b9a55d from tip, use start_new_session instead of os.setsid.
authorGregory P. Smith <greg@krypto.org>
Tue, 15 Mar 2011 19:24:43 +0000 (15:24 -0400)
committerGregory P. Smith <greg@krypto.org>
Tue, 15 Mar 2011 19:24:43 +0000 (15:24 -0400)
Lib/webbrowser.py

index e369acb1df64a623119ce220b4b887adf0a12e91..415f12ac5f3f90cb06ae737e4931b879d8910ea7 100644 (file)
@@ -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.