Skip to content

Commit

Permalink
Avoid signal "leaking" and use KILL instead of TERM.
Browse files Browse the repository at this point in the history
When we want to force the termination of the unresponsive processes, better use Kill than TERM - TERM, if previosly delivered may be queued and lost.
  • Loading branch information
bogdan-iancu committed May 18, 2018
1 parent 5f42814 commit 8073d4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ static void shutdown_opensips( int status )

if (i==0 && n!=0) {
/* whatever processes are still running are to be brutally
* terminated via SIGTERM */
* terminated via SIGKILL */
LM_DBG("force termination for all processes\n");
kill_all_children(SIGTERM);
kill_all_children(SIGKILL);
if (signal(SIGALRM, sig_alarm_kill) == SIG_ERR ) {
LM_ERR("could not install SIGALARM handler\n");
/* continue, the process will die anyway if no
Expand Down

0 comments on commit 8073d4d

Please sign in to comment.