Browse Source

*** empty log message ***

Andrei Pelinescu-Onciul 23 years ago
parent
commit
8e8c1478b8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      main.c

+ 2 - 2
main.c

@@ -412,6 +412,8 @@ void handle_sigs()
 			else
 				DBG("SIGTERM received, program terminates\n");
 				
+			/* first of all, kill the children also */
+			kill(0, SIGTERM);
 			destroy_modules();
 #ifdef PKG_MALLOC
 			LOG(memlog, "Memory status (pkg):\n");
@@ -425,8 +427,6 @@ void handle_sigs()
 			shm_mem_destroy();
 #endif
 			if (pid_file) unlink(pid_file);
-			/* kill children also*/
-			kill(0, SIGTERM);
 			dprint("Thank you for flying " NAME "\n");
 			exit(0);
 			break;