From 3474de599fa9beff3931e7f655156acefff3f655 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 25 Oct 2009 20:25:06 +0100 Subject: Change child_kill_children() to take the signal as an argument. --- src/child.c | 4 ++-- src/child.h | 2 +- src/main.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/child.c b/src/child.c index 0a79d7e..b638b99 100644 --- a/src/child.c +++ b/src/child.c @@ -440,13 +440,13 @@ void child_main_loop (void) /* * Go through all the non-empty children and cancel them. */ -void child_kill_children (void) +void child_kill_children (int sig) { unsigned int i; for (i = 0; i != child_config.maxclients; i++) { if (child_ptr[i].status != T_EMPTY) - kill (child_ptr[i].tid, SIGTERM); + kill (child_ptr[i].tid, sig); } } diff --git a/src/child.h b/src/child.h index 1197eb2..7fec1dc 100644 --- a/src/child.h +++ b/src/child.h @@ -33,7 +33,7 @@ extern short int child_pool_create (void); extern int child_listening_sock (uint16_t port); extern void child_close_sock (void); extern void child_main_loop (void); -extern void child_kill_children (void); +extern void child_kill_children (int sig); extern short int child_configure (child_config_t type, unsigned int val); diff --git a/src/main.c b/src/main.c index c790498..e22b9e7 100644 --- a/src/main.c +++ b/src/main.c @@ -473,7 +473,7 @@ main (int argc, char **argv) log_message (LOG_INFO, "Shutting down."); - child_kill_children (); + child_kill_children (SIGTERM); child_close_sock (); /* Remove the PID file */ -- cgit v1.2.3