Repository: celix Updated Branches: refs/heads/develop d970233fa -> c5bc7496c
CELIX-77: Fix signal handler initialization Project: http://git-wip-us.apache.org/repos/asf/celix/repo Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/6a2050fb Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/6a2050fb Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/6a2050fb Branch: refs/heads/develop Commit: 6a2050fb5de2e901260759bcb3187364ae910a63 Parents: d970233 Author: Bjoern Petri <[email protected]> Authored: Mon Dec 14 12:51:49 2015 +0100 Committer: Bjoern Petri <[email protected]> Committed: Mon Dec 14 12:51:49 2015 +0100 ---------------------------------------------------------------------- utils/private/src/thpool.c | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/celix/blob/6a2050fb/utils/private/src/thpool.c ---------------------------------------------------------------------- diff --git a/utils/private/src/thpool.c b/utils/private/src/thpool.c index 6e7f372..845c291 100644 --- a/utils/private/src/thpool.c +++ b/utils/private/src/thpool.c @@ -349,6 +349,10 @@ static void* thread_do(struct thread* thread_p){ /* Register signal handler */ struct sigaction act; + + sigemptyset(&act.sa_mask); + sigaddset(&act.sa_mask, SIGUSR1); + act.sa_handler = thread_hold; if (sigaction(SIGUSR1, &act, NULL) == -1) { fprintf(stderr, "thread_do(): cannot handle SIGUSR1");
