This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients martin.panter, vstinner
Date 2016-05-20.12:54:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463748890.65.0.675189792439.issue27068@psf.upfronthosting.co.za>
In-reply-to
Content
One potential way to fix Issue 27069 (leave a webbrowser running in the background) might be to use a detach() method. Pseudocode:

launcher = """\
import subprocess, sys
proc = subprocess.Popen(sys.argv)

# Popen object gives up “ownership” of child.
# Caller exits straight afterwards, letting the OS take care of monitoring the child.
proc.detach()
"""

def open_firefox(url):
    cmd = (sys.executable, "-c", launcher, "firefox", url)
    subprocess.check_call(cmd)
History
Date User Action Args
2016-05-20 12:54:50martin.pantersetrecipients: + martin.panter, vstinner
2016-05-20 12:54:50martin.pantersetmessageid: <1463748890.65.0.675189792439.issue27068@psf.upfronthosting.co.za>
2016-05-20 12:54:50martin.panterlinkissue27068 messages
2016-05-20 12:54:50martin.pantercreate