summaryrefslogtreecommitdiff
path: root/test/ruby/test_lambda.rb
diff options
context:
space:
mode:
authorKJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>2023-08-18 23:19:21 +1000
committernagachika <nagachika@ruby-lang.org>2023-09-09 18:51:25 +0900
commit0b7a4fbaa9c56d2c67d00d86c69f9e5c71803267 (patch)
treec5cd8199be8058accd4405b70f6c2f50a7ddbf73 /test/ruby/test_lambda.rb
parentbbdffef63c55a594e604bd1ec5e90bffc6ea4c12 (diff)
Allow waitpid(-1) to be woken if a waitpid(pid) call is pending
If two threads are running, with one calling waitpid(-1), and another calling waitpid($some_pid), and then $some_other_pid exits, we would expect the waitpid(-1) call to retrieve that exit status; however, it cannot actually do so until $some_pid _also_ exits. This patch fixes the issue by unconditionally checking for pending process group waits on SIGCHLD, and then allowing pending pid-only waits to "steal" the notification. [Fixes #19387]
Diffstat (limited to 'test/ruby/test_lambda.rb')
0 files changed, 0 insertions, 0 deletions