mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
POSIX timer cannot be shared in forked process [Bug #17941]
This commit is contained in:
parent
9f110ced57
commit
73f9831a57
1 changed files with 1 additions and 0 deletions
|
@ -1836,6 +1836,7 @@ ubf_timer_disarm(void)
|
|||
#if UBF_TIMER == UBF_TIMER_POSIX
|
||||
rb_atomic_t prev;
|
||||
|
||||
if (timer_posix.owner && timer_posix.owner != getpid()) return;
|
||||
prev = timer_state_cas(RTIMER_ARMED, RTIMER_DISARM);
|
||||
switch (prev) {
|
||||
case RTIMER_DISARM: return; /* likely */
|
||||
|
|
Loading…
Reference in a new issue