virNetClientSetTLSSession: Restore original signal mask
Currently, we use pthread_sigmask(SIG_BLOCK, ...) prior to calling
poll(). This is okay, as we don't want poll() to be interrupted.
However, then - immediately as we fall out from the poll() - we try to
restore the original sigmask - again using SIG_BLOCK. But as the man
page says, SIG_BLOCK adds signals to the signal mask:
SIG_BLOCK
The set of blocked signals is the union of the current set and the set argument.
Therefore, when restoring the original mask, we need to completely
overwrite the one we set earlier and hence we should be using:
SIG_SETMASK
The set of blocked signals is set to the argument set.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Showing
-
mentioned in commit b1066acb
-
mentioned in commit 800eb5ac
-
mentioned in commit f4d67fdb
-
mentioned in commit 892107de
-
mentioned in commit 4cbba884
-
mentioned in commit 6b48d5e6
-
mentioned in commit 5abdbf13
-
mentioned in commit 5423caa9
-
mentioned in commit 3bec3cdb
-
mentioned in commit 8e0376e5
-
mentioned in commit f1725e60
-
mentioned in commit 90c21d77
-
mentioned in commit 57170e15
-
mentioned in commit 93394f56
-
mentioned in commit 88bdd6b9
想要评论请 注册 或 登录