[pkg-opensc-commit] [pkcs11-helper] 36/53: Block signals to own threads only
Eric Dorland
eric at moszumanska.debian.org
Fri Jan 6 23:39:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to tag pkcs11-helper-1.03
in repository pkcs11-helper.
commit b0218e4b9881b065b3521342d1afe476bb8df3d0
Author: alonbl <alonbl at 485eb718-1723-0410-b8a9-88cf21a28c35>
Date: Tue Apr 24 18:32:02 2007 +0000
Block signals to own threads only
---
ChangeLog | 2 ++
lib/pkcs11h-threading.c | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 878774a..092ccf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@ $Id$
* Certificate session period fixup, thank to Leo Pohl for reporting.
+* Block signals for own threads using pthread calls.
+
2007-10-05 - Version 1.02
* Switch to free implementation of PKCS#11 headers.
diff --git a/lib/pkcs11h-threading.c b/lib/pkcs11h-threading.c
index 2b82c7d..1ca3203 100644
--- a/lib/pkcs11h-threading.c
+++ b/lib/pkcs11h-threading.c
@@ -485,6 +485,7 @@ static
void *
___pkcs11h_thread_start (void *p) {
___pkcs11h_thread_data_t *_data = (___pkcs11h_thread_data_t *)p;
+ sigset_t signal_mask;
void *ret;
int i;
@@ -492,9 +493,11 @@ ___pkcs11h_thread_start (void *p) {
* Ignore any signal in
* this thread
*/
+ sigemptyset (&signal_mask);
for (i=1;i<16;i++) {
- signal (i, SIG_IGN);
+ sigaddset (&signal_mask, i);
}
+ pthread_sigmask (SIG_SETMASK, &signal_mask, NULL);
ret = _data->start (_data->data);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/pkcs11-helper.git
More information about the pkg-opensc-commit
mailing list