Explorar o código

*** empty log message ***

Andrei Pelinescu-Onciul %!s(int64=23) %!d(string=hai) anos
pai
achega
8e8c1478b8
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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;