Changes by Gregory P. Smith :
--
resolution: -> duplicate
status: open -> closed
superseder: -> subprocess.Popen.send_signal doesn't check whether the process
has terminated
___
Python tracker
Martin Panter added the comment:
This is more or less a dupe of Issue 6973, which also has a potential patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17131
___
Gregory P. Smith added the comment:
agreed, we could at least do that for the Popen methods.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17131
___
Changes by Gregory P. Smith g...@krypto.org:
--
assignee: - gregory.p.smith
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17131
___
Martin Panter added the comment:
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
Gregory P. Smith added the comment:
issue14252 appears to have been a fix for the windows side only.
On Posix the best that could be done here is to catch OSError within
Popen.terminate() and Popen.kill() and ignore the problem if there was an error.
We do not have a way to know if the child
Mark Lawrence added the comment:
@Siona sorry about the delay in getting back to you. Can someone try this
please as I've only got Windows.
--
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.2
___
Python tracker
Changes by Ned Deily n...@acm.org:
--
nosy: +gregory.p.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17131
___
___
Python-bugs-list mailing
New submission from S Arrowsmith:
Compare this with the script in #14252:
p = Popen(['/bin/sleep', '1'])
time.sleep(1)
p.terminate()
print p.poll()
p.terminate()
Output is:
0
Traceback (most recent call last):
File stdin, line 1, in module
File /usr/lib/python2.6/subprocess.py, line 1269,