Project

General

Profile

« Previous | Next » 

Revision 5be38692

Added by Eric Wong almost 8 years ago

process: block/unblock signals around fork

As with forking for execve(2) in spawn', we must block signals to ensure they are handled correctly in a freshly fork'-ed child.

  • process.c (retry_fork_ruby): block/unblock signals around fork
    (rb_fork_ruby): re-enable signals in forked child

  • test/ruby/test_process.rb (test_forked_child_signal): new test
    [ruby-core:82883] [Bug #13916]

    Thanks to Russell Davis for the bug report and test case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e