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 BreamoreBoy, gregory.p.smith, martin.panter, siona
Date 2014-07-20.02:42:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405824170.66.0.812332304595.issue17131@psf.upfronthosting.co.za>
In-reply-to
Content
For Posix (dunno about Windows), calling terminate or kill at the OS level after a poll or wait has already succeeded is a bad idea, because the PID may have been recycled. It is essentially operating on a released resource, similar to calling “os.close” on a closed FD, or freeing unallocated memory.

There is a way to know if the PID is still valid though. Just make sure that successful poll and wait calls invalidate the PID. Then calling terminate or kill, or any other operation that requires the PID, would no longer be valid (or could do nothing if that is more appropriate). Similar to the behaviour of file objects after they are closed: subsequent close calls do nothing; other operations raise an exception.
History
Date User Action Args
2014-07-20 02:42:50martin.pantersetrecipients: + martin.panter, gregory.p.smith, siona, BreamoreBoy
2014-07-20 02:42:50martin.pantersetmessageid: <1405824170.66.0.812332304595.issue17131@psf.upfronthosting.co.za>
2014-07-20 02:42:50martin.panterlinkissue17131 messages
2014-07-20 02:42:50martin.pantercreate