diff --git a/src/ckpool.c b/src/ckpool.c index 2e25a452..c94bc928 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -153,9 +153,6 @@ static void shutdown_children(ckpool_t *ckp, int sig) static void sighandler(int sig) { - /* Restore signal handlers so we can still quit if shutdown fails */ - sigaction(SIGTERM, &global_ckp->termhandler, NULL); - sigaction(SIGINT, &global_ckp->inthandler, NULL); shutdown_children(global_ckp, sig); clean_up(global_ckp); exit(0); @@ -219,8 +216,8 @@ int main(int argc, char **argv) handler.sa_handler = &sighandler; handler.sa_flags = 0; sigemptyset(&handler.sa_mask); - sigaction(SIGTERM, &handler, &ckp.termhandler); - sigaction(SIGINT, &handler, &ckp.inthandler); + sigaction(SIGTERM, &handler, NULL); + sigaction(SIGINT, &handler, NULL); /* Shutdown from here */ join_pthread(pth_listener); diff --git a/src/libckpool.h b/src/libckpool.h index 899c786b..fad3d077 100644 --- a/src/libckpool.h +++ b/src/libckpool.h @@ -145,10 +145,6 @@ struct ckpool_instance { /* Process instances of child processes */ proc_instance_t main; proc_instance_t generator; - - /* Original signal handlers */ - struct sigaction termhandler; - struct sigaction inthandler; }; void create_pthread(pthread_t *thread, void *(*start_routine)(void *), void *arg);