1
0
Fork 0
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:
Nobuyoshi Nakada 2021-06-09 12:32:18 +09:00
parent 9f110ced57
commit 73f9831a57
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -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 */