From 48a69742fef07075c112acf821040af06c969d98 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 20 Mar 2018 17:58:11 -0700 Subject: [PATCH] timer_create: use SIG_SETMASK restore the signal mask. Bug: http://b/73144101 Test: ran tests Change-Id: I9adf3a512c120ef2280ad469ad11366222d61463 --- libc/bionic/posix_timers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/bionic/posix_timers.cpp b/libc/bionic/posix_timers.cpp index 1abeb1f85..47d6db05f 100644 --- a/libc/bionic/posix_timers.cpp +++ b/libc/bionic/posix_timers.cpp @@ -154,7 +154,7 @@ int timer_create(clockid_t clock_id, sigevent* evp, timer_t* timer_id) { int rc = pthread_create(&timer->callback_thread, &thread_attributes, __timer_thread_start, timer); - __rt_sigprocmask(SIG_BLOCK, &old_sigset, nullptr, sizeof(old_sigset)); + __rt_sigprocmask(SIG_SETMASK, &old_sigset, nullptr, sizeof(old_sigset)); if (rc != 0) { free(timer);