]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-30643: Fix race condition in signal wakeup in forkserver (followup to PR #1989...
authorAntoine Pitrou <pitrou@free.fr>
Tue, 13 Jun 2017 07:46:06 +0000 (09:46 +0200)
committerGitHub <noreply@github.com>
Tue, 13 Jun 2017 07:46:06 +0000 (09:46 +0200)
commit2b5cc5ebaff41445200753f1a69fd4e6a9475a1e
treee5d70f0ba342a9f6cfe79329abfbb705e17a89be
parentbd4e9e0ca96dabf33605d9b1fd1e0562ece8ae18
bpo-30643: Fix race condition in signal wakeup in forkserver (followup to PR #1989) (#2139)

* Fix race condition in signal wakeup in forkserver (followup to PR #1989)

There's an admittedly well-known race condition where ECHILD can arrive
just before the C function epoll_wait() and the latter wouldn't therefore
return EINTR.  The solution is to use set_wakeup_fd(), which was designed
to avoid such race conditions.

* Reset wakeup fd in child
Lib/multiprocessing/forkserver.py