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 milko.krachounov
Recipients milko.krachounov
Date 2009-09-22.22:47:46
SpamBayes Score 2.6101707e-06
Marked as misclassified No
Message-id <1253659668.76.0.344119676181.issue6973@psf.upfronthosting.co.za>
In-reply-to
Content
When subprocess.Popen.send_signal is called, it simply calls
os.kill(self.pid, ...) without checking whether the child has already
terminated. If the child has been terminated, and Popen.wait() or
Popen.poll() have been called, a process with PID self.pid no longer
exists, and what's worse, could belong to a totally unrelated process.

A better behavior would be to raise an exception when self.returncode is
not None. Alternatively, self.pid might be set to None after the process
has been terminated, as it is no longer meaningful. Or to another value
that would be invalid pid and invalid argument to os.kill and os.wait,
but unlike None would still evaluate to True.
History
Date User Action Args
2009-09-22 22:47:48milko.krachounovsetrecipients: + milko.krachounov
2009-09-22 22:47:48milko.krachounovsetmessageid: <1253659668.76.0.344119676181.issue6973@psf.upfronthosting.co.za>
2009-09-22 22:47:47milko.krachounovlinkissue6973 messages
2009-09-22 22:47:46milko.krachounovcreate