[Python-checkins] [python/cpython] 2b5cc5: bpo-30643: Fix race condition in signal wakeup in ...

GitHub noreply at github.com
Tue Jun 13 03:46:09 EDT 2017


  Branch: refs/heads/master
  Home:   https://github.com/python/cpython
  Commit: 2b5cc5ebaff41445200753f1a69fd4e6a9475a1e
      https://github.com/python/cpython/commit/2b5cc5ebaff41445200753f1a69fd4e6a9475a1e
  Author: Antoine Pitrou <pitrou at free.fr>
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
    M Lib/multiprocessing/forkserver.py

  Log Message:
  -----------
  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




More information about the Python-checkins mailing list