From 4abb3ec7655723725bd62ffc53600a6396de1513 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 3 Oct 2010 22:45:06 +0000 Subject: [PATCH] blocking sig child --- door_daemon/sig_handler.c | 2 ++ powersensordaemon/sig_handler.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/door_daemon/sig_handler.c b/door_daemon/sig_handler.c index 2a17ebe..5cdaaa1 100644 --- a/door_daemon/sig_handler.c +++ b/door_daemon/sig_handler.c @@ -96,6 +96,7 @@ int signal_init() (sigaction(SIGHUP, &act, NULL) < 0) || (sigaction(SIGUSR1, &act, NULL) < 0) || (sigaction(SIGUSR2, &act, NULL) < 0) || + (sigaction(SIGCHLD, &act_ign, NULL) < 0) || (sigaction(SIGPIPE, &act_ign, NULL) < 0)) { log_printf(ERROR, "signal handling init failed (sigaction error: %s)", strerror(errno)); @@ -158,6 +159,7 @@ void signal_stop() sigaction(SIGUSR1, &act, NULL); sigaction(SIGUSR2, &act, NULL); sigaction(SIGPIPE, &act, NULL); + sigaction(SIGCHLD, &act, NULL); close(sig_pipe_fds[0]); close(sig_pipe_fds[1]); diff --git a/powersensordaemon/sig_handler.c b/powersensordaemon/sig_handler.c index 2a17ebe..5cdaaa1 100644 --- a/powersensordaemon/sig_handler.c +++ b/powersensordaemon/sig_handler.c @@ -96,6 +96,7 @@ int signal_init() (sigaction(SIGHUP, &act, NULL) < 0) || (sigaction(SIGUSR1, &act, NULL) < 0) || (sigaction(SIGUSR2, &act, NULL) < 0) || + (sigaction(SIGCHLD, &act_ign, NULL) < 0) || (sigaction(SIGPIPE, &act_ign, NULL) < 0)) { log_printf(ERROR, "signal handling init failed (sigaction error: %s)", strerror(errno)); @@ -158,6 +159,7 @@ void signal_stop() sigaction(SIGUSR1, &act, NULL); sigaction(SIGUSR2, &act, NULL); sigaction(SIGPIPE, &act, NULL); + sigaction(SIGCHLD, &act, NULL); close(sig_pipe_fds[0]); close(sig_pipe_fds[1]); -- 1.7.10.4