diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-05-24 16:34:34 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-05-24 17:50:23 -0700 |
commit | 1ef39d8d099f145222b9352423af16a2bab6e05b (patch) | |
tree | c41c2dfcc16a9325d8cd6c44945d6bed969b8107 /hash.c | |
parent | 19430b776c3ebae1adfdc5cbe6cdf69a92e37253 (diff) | |
download | ruby-1ef39d8d099f145222b9352423af16a2bab6e05b.tar.gz |
Fix process not waking up on signals on OpenBSD
When using UBF_TIMER_PTHREAD (the UBF handler on OpenBSD), the
timer_pthread_fn function will not signal the main thread with
SIGVTALRM in cases where timer_pthread is armed before
consume_communication_pipe is called. This is because
consume_communication_pipe will unarm the timer.
Fix this by checking the return value of consume_communication_pipe.
If it returns TRUE and the timer_pthread is disarmed, then signal
the main thread with SIGVTALRM.
On OpenBSD, this fixes TestThread#test_thread_timer_and_interrupt, and
fixes hangs in TestProcess#test_execopts_redirect_open_fifo_interrupt_raise
and TestProcess#test_execopts_redirect_open_fifo_interrupt_print.
It also fixes the use of Ctrl+C/SIGINT in irb on OpenBSD. It does not
cause any test failures on Linux when UBF_TIMER_PTHREAD is forced as
the UBF handler.
Fixes [Bug #15798]
Diffstat (limited to 'hash.c')
0 files changed, 0 insertions, 0 deletions