You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked at man 3 pthread_sigmask it just forwards to man 2 sigprocmask which states:
sigprocmask() is used to fetch and/or change the signal mask of the
calling thread. The signal mask is the set of signals whose delivery
is currently blocked for the caller (see also signal(7) for more
details).
The behavior of the call is dependent on the value of how, as follows.
SIG_BLOCK
The set of blocked signals is the union of the current set and
the set argument.
SIG_UNBLOCK
The signals in set are removed from the current set of blocked
signals. It is permissible to attempt to unblock a signal which
is not blocked.
SIG_SETMASK
The set of blocked signals is set to the argument set.
So to fix it, I believe in ~SignalsBlocker it should use SIG_SETMASK rather than SIG_BLOCK.
When the above program is linked against a log4cplus (with pthreads enabled), it will not
receive any signals.
By looking at the code it seems to be related to the recent change prompted by issue #385.
I looked at
man 3 pthread_sigmask
it just forwards toman 2 sigprocmask
which states:So to fix it, I believe in
~SignalsBlocker
it should useSIG_SETMASK
rather thanSIG_BLOCK
.Info:
The text was updated successfully, but these errors were encountered: