Change child_kill_children() to take the signal as an argument.
This commit is contained in:
parent
1b4d130cf5
commit
3474de599f
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user