Message123444
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. |
|
Date |
User |
Action |
Args |
2010-12-06 00:05:25 | joseph.h.garvin | set | recipients:
+ joseph.h.garvin |
2010-12-06 00:05:25 | joseph.h.garvin | set | messageid: <1291593925.84.0.564814760891.issue10635@psf.upfronthosting.co.za> |
2010-12-06 00:05:24 | joseph.h.garvin | link | issue10635 messages |
2010-12-06 00:05:24 | joseph.h.garvin | create | |
|