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 vstinner
Recipients pitrou, vstinner
Date 2011-05-26.13:32:20
SpamBayes Score 1.7444914e-05
Marked as misclassified No
Message-id <1306416741.33.0.363365904037.issue12187@psf.upfronthosting.co.za>
In-reply-to
Content
Polling should be avoided when it's possible. For subprocess.wait(), we can do something with signals (SIGCHLD and/or SIGCLD).

sigtimedwait() can be used to wait a the "a child process terminated" with a timeout, but not wait a specific process (so we may use a loop). sigtimedwait() doesn't call the signal handler, and so it changes the behaviour if the parent process has a signal handler for SIGCHLD/SIGCLD.

If sigtimedwait() is not available, we may use a signal handler. For example, we can use the "wakeup fd" tool of the signal module. Problem: the parent program may already have such handler / use "wakeup fd". We should at least restore the previous signal handler when we are done.
History
Date User Action Args
2011-05-26 13:32:21vstinnersetrecipients: + vstinner, pitrou
2011-05-26 13:32:21vstinnersetmessageid: <1306416741.33.0.363365904037.issue12187@psf.upfronthosting.co.za>
2011-05-26 13:32:20vstinnerlinkissue12187 messages
2011-05-26 13:32:20vstinnercreate