It looks like r44687 implements a partial fix for this, but my
proposed patch covers more cases and is more complete.

   * process.c (recv_child_error): Fix deadlock in rb_fork_internal when a
     signal is sent to the parent process while Ruby is forking in IO.popen.

    Patch by Scott Francis. Closes GH-513.