bpo-30643: Fix race condition in signal wakeup in forkserver (followu… · python/cpython@2b5cc5e · GitHub
Skip to content

Commit 2b5cc5e

Browse files
authored
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
1 parent bd4e9e0 commit 2b5cc5e

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Lib/multiprocessing/forkserver.py

Lines changed: 8 additions & 4 deletions

0 commit comments

Comments
 (0)