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 joseph.h.garvin
Recipients joseph.h.garvin
Date 2010-12-06.00:05:24
SpamBayes Score 1.0400711e-08
Marked as misclassified No
Message-id <1291593925.84.0.564814760891.issue10635@psf.upfronthosting.co.za>
In-reply-to
Content
The following code will cause the interpreter to hang:

import subprocess
import signal
subprocess.Popen("/bin/echo", preexec_fn=signal.pause)

Replace "/bin/echo" with any valid program on your box, it's just the simplest Linux example. It's expected for signal.pause to block, but the documentation for Popen says that preexec_fn will be run in the /child/ process, so it shouldn't cause the interpreter running this code to block.

I'm going to guess Popen is using signals for some reason internally and signal.pause interferes with it. It's probably worth making sure that signals related functions work with preexec_fn in general.
History
Date User Action Args
2010-12-06 00:05:25joseph.h.garvinsetrecipients: + joseph.h.garvin
2010-12-06 00:05:25joseph.h.garvinsetmessageid: <1291593925.84.0.564814760891.issue10635@psf.upfronthosting.co.za>
2010-12-06 00:05:24joseph.h.garvinlinkissue10635 messages
2010-12-06 00:05:24joseph.h.garvincreate