diff options
Diffstat (limited to 'src/proclist.c')
-rw-r--r-- | src/proclist.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/proclist.c b/src/proclist.c index 55441ac..4fb406f 100644 --- a/src/proclist.c +++ b/src/proclist.c @@ -4,3 +4,3 @@ This file is part of GNU Anubis. - Copyright (C) 2005-2014 The Anubis Team. + Copyright (C) 2005-2024 The Anubis Team. @@ -107,3 +107,3 @@ proclist_cleanup (void (*fun) (size_t, pid_t, int)) /* SIGCHLD handler. */ -static RETSIGTYPE +static void sig_child (int code) @@ -113,3 +113,2 @@ sig_child (int code) list_iterate (process_list, update_process_status, &ps); - signal (code, sig_child); } @@ -133,4 +132,10 @@ proclist_init () { + struct sigaction act; + + act.sa_handler = sig_child; + sigemptyset (&act.sa_mask); + act.sa_flags = 0; + sigaction (SIGCHLD, &act, NULL); + process_list = list_create (); - signal (SIGCHLD, sig_child); } |