From: Eric Wong Date: 2017-12-15T07:21:11+00:00 Subject: [ruby-core:84279] Re: [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD nobu@ruby-lang.org wrote: > It seems the signal trap causes thread switching then `Process.waitpid` exits. > That means the target thread status can change during `RUBY_VM_CHECK_INTS_BLOCKING`, but `sleep_forever` doesn't consider the condition to wait at that moment. Right, that seems correct. I was considering passing target_th to sleep_forever last night to check target_th->status inside sleep_forever; but I think sleep_forever is too complex already. I guess the sleep_wait_for_interrupt path when !forever has the same problem and might sleep too long.. Unsubscribe: