STINNER Victor <vstin...@python.org> added the comment:

On Linux, a pidfd file descriptor can be created with os.pidfd_open() (added to 
Python 3.9). It would avoid even more race conditions. The best would be to 
request a pidfd file descriptor directly when we spawn the process which is 
possible on recent Linux kernel versions.

> we should probably document it clearly in Popen.send_signal() and all of its 
> callers that these functions might reap the child.

Feel free to propose a PR to document the behavior.

I'm not sure of what you mean by send_signal() which "reaps" the child process.

See also bpo-40550.

Anyway, this issue and bpo-40550 are closed. I suggest to open a new issue to 
enhance the documentation.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38630>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to