Browse Source

core: move exit salutation before killing children

- syslog() is not re-entrant (see linux man page) and can cause troubles
- some that could be related is reported by Alex Hermann, FS#165
Daniel-Constantin Mierla 14 years ago
parent
commit
724a642d99
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main.c

+ 1 - 1
main.c

@@ -699,9 +699,9 @@ void handle_sigs()
 				DBG("INT received, program terminates\n");
 				DBG("INT received, program terminates\n");
 			else
 			else
 				DBG("SIGTERM received, program terminates\n");
 				DBG("SIGTERM received, program terminates\n");
+			LOG(L_NOTICE, "Thank you for flying " NAME "!!!\n");
 			/* shutdown/kill all the children */
 			/* shutdown/kill all the children */
 			shutdown_children(SIGTERM, 1);
 			shutdown_children(SIGTERM, 1);
-			LOG(L_NOTICE, "Thank you for flying " NAME "\n");
 			exit(0);
 			exit(0);
 			break;
 			break;