shutdown: free children from right place
This commit is contained in:
parent
2f3a3828ac
commit
372d7ff824
@ -245,6 +245,10 @@ void child_kill_children (int sig)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void child_free_children(void) {
|
||||||
|
sblist_free(childs);
|
||||||
|
childs = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listen on the various configured interfaces
|
* Listen on the various configured interfaces
|
||||||
|
@ -36,6 +36,7 @@ extern int child_listening_sockets (vector_t listen_addrs, uint16_t port);
|
|||||||
extern void child_close_sock (void);
|
extern void child_close_sock (void);
|
||||||
extern void child_main_loop (void);
|
extern void child_main_loop (void);
|
||||||
extern void child_kill_children (int sig);
|
extern void child_kill_children (int sig);
|
||||||
|
extern void child_free_children(void);
|
||||||
|
|
||||||
extern short int child_configure (child_config_t type, unsigned int val);
|
extern short int child_configure (child_config_t type, unsigned int val);
|
||||||
|
|
||||||
|
@ -401,6 +401,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
child_kill_children (SIGTERM);
|
child_kill_children (SIGTERM);
|
||||||
child_close_sock ();
|
child_close_sock ();
|
||||||
|
child_free_children();
|
||||||
|
|
||||||
/* Remove the PID file */
|
/* Remove the PID file */
|
||||||
if (config->pidpath != NULL && unlink (config->pidpath) < 0) {
|
if (config->pidpath != NULL && unlink (config->pidpath) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user