Actions
Feature #12693
closedWant a way to receive EINTR on Process.waitpid
Status:
Rejected
Assignee:
-
Target version:
-
Description
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.
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0