Nathaniel Smith <n...@pobox.com> added the comment:

You can't solve a time-of-check-to-time-of-use race by adding another check. I 
guess your patch might narrow the race window slightly, but it was a tiny 
window before and it's a tiny window after, so I don't really get it.

The test doesn't demonstrate a race condition. What it demonstrates is 
increased robustness against user code that corrupts Popen's internal state by 
reaping one of its processes behind its back.

That kind of robustness might be a good motivation on its own! (I actually just 
did a bunch of work to make trio more robust against user code closing fds 
behind its back, which is a similar kind of thing.) But it's a very different 
motivation than what you say in this bug.

----------

_______________________________________
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