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 tholzer
Recipients tholzer
Date 2010-02-15.01:28:49
SpamBayes Score 4.4833263e-07
Marked as misclassified No
Message-id <1266197391.52.0.804629810588.issue7933@psf.upfronthosting.co.za>
In-reply-to
Content
When a sub-process is spawned from Python (e.g. subprocess.Popen, os.system, etc.), the execution semantics are altered by the Python interpreter as it ignores SIGPIPE which gets inherited by all children.

This causes hung processes, CPU spins and various other altered execution semantics for all sub-processes spawned from Python.

The following example will end up spinning the CPU at 100% whereas the expected behaviour is that it would print a single line of random numbers and exit.

<pre>
python -c 'import subprocess; p = subprocess.Popen("hexdump /dev/urandom | head -n 1", shell=True); print "a %s %s" % (p.communicate());'
</pre>
History
Date User Action Args
2010-02-15 01:29:52tholzersetrecipients: + tholzer
2010-02-15 01:29:51tholzersetmessageid: <1266197391.52.0.804629810588.issue7933@psf.upfronthosting.co.za>
2010-02-15 01:28:51tholzerlinkissue7933 messages
2010-02-15 01:28:49tholzercreate