OSDN Git Service

sigchain: allow use of sigprocmask inside handlers.
authorJosh Gao <jmgao@google.com>
Mon, 20 Mar 2017 21:58:25 +0000 (14:58 -0700)
committerJosh Gao <jmgao@google.com>
Fri, 24 Mar 2017 03:09:04 +0000 (20:09 -0700)
commit904445581279b1e976dfbd8ad3a3379b74ee7789
treeac0a95afec5a7dc4e916f5996d6c4fec307a3a24
parentdd241ae08d497ae8fa1add3e208c4c3bef9a7b79
sigchain: allow use of sigprocmask inside handlers.

When we're inside a signal handler, we don't need to filter out claimed
signals from sigprocmask calls, since return from the signal handler
will restore the previous signal mask. Use the handling_signal thread
local to pass sigprocmask through when we're in a signal handler.

Bug: http://b/36205469
Bug: http://b/36262089
Change-Id: I7943e7a68c7929d9244cef83ddeb3d64243d8840
sigchainlib/sigchain.cc