Message382475
The script fails with "ChildProcessError: [Errno 10] No child processes" on line:
> os.waitpid(child.pid, 0)
The line before, you call child.kill() which sends SIGKILL signal to the process. So it's likely that the process will complete (killed by SIGKILL) soon.
I don't think that it's a good idea to attempt reading the process status directly (by calling os.waitpid), since subprocess already tracks the process status.
There is the public child.poll() API which calls os.waitpid(child.pid, 0) in a safe way for you. Why not using this API?
IMO this issue is not a bug.
Note: Python 3.8 behaves differently, but it doesn't mean that calling directly os.waitpid() was a good idea in Python 3.8 and older ;-) |
|
Date |
User |
Action |
Args |
2020-12-04 11:08:55 | vstinner | set | recipients:
+ vstinner, gregory.p.smith, oconnor663 |
2020-12-04 11:08:55 | vstinner | set | messageid: <1607080135.02.0.987277529156.issue42558@roundup.psfhosted.org> |
2020-12-04 11:08:55 | vstinner | link | issue42558 messages |
2020-12-04 11:08:54 | vstinner | create | |
|