Message93022
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. |
|
Date |
User |
Action |
Args |
2009-09-22 22:47:48 | milko.krachounov | set | recipients:
+ milko.krachounov |
2009-09-22 22:47:48 | milko.krachounov | set | messageid: <1253659668.76.0.344119676181.issue6973@psf.upfronthosting.co.za> |
2009-09-22 22:47:47 | milko.krachounov | link | issue6973 messages |
2009-09-22 22:47:46 | milko.krachounov | create | |
|