Issue #12693 has been updated by Naotoshi Seo.

Status changed from Open to Rejected

----------------------------------------
Feature #12693: Want a way to receive EINTR on Process.waitpid
https://bugs.ruby-lang.org/issues/12693#change-60244

* Author: Naotoshi Seo
* Status: Rejected
* 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: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>