diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-06-09 12:32:18 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-06-09 12:32:18 +0900 |
commit | 73f9831a57e133ab5645221df862a176a42f6685 (patch) | |
tree | dc051788f728f5b7dd997e6cb088c367447762c9 /thread_pthread.c | |
parent | 9f110ced578ec944f7f7cbe11ba3519a25adf714 (diff) |
POSIX timer cannot be shared in forked process [Bug #17941]
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 8e983076b6..4be3f10bf8 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -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 */ |