From: sonots@... Date: 2016-08-23T06:55:34+00:00 Subject: [ruby-core:77012] [Ruby trunk Feature#12693] Want a way to receive EINTR on Process.waitpid Issue #12693 has been updated by Naotoshi Seo. If adding an option to raise EINTR is not acceptable, adding timeout option is acceptable for **my** case. ---------------------------------------- Feature #12693: Want a way to receive EINTR on Process.waitpid https://bugs.ruby-lang.org/issues/12693#change-60241 * Author: Naotoshi Seo * Status: Open * Priority: Normal * Assignee: ---------------------------------------- http://man7.org/linux/man-pages/man2/waitpid.2.html tells EINTR error if WNOHANG flag was not set and an unblocked signal or a SIGCHLD was caught. However, ruby implementation of Process.waitpid does not raise EINTR https://github.com/ruby/ruby/blob/c2bf7e6f7d2fbe0b50da59aaa1374222f233aa71/process.c#L910-L911 test.rb ``` puts Process.pid trap(:CONT) do puts 'CONT' end _pid = fork do sleep 10 end Process.waitpid(-1) ``` ``` $ ruby test.rb ``` ``` $ kill -CONT xxxx # waitpid does not raise EINTR ``` I want a way or an option to get EINTR error on sending signal so that I can release blocking of waitpid. It is same for wait, waitpid2, wait2, too. -- https://bugs.ruby-lang.org/ Unsubscribe: