Sfoglia il codice sorgente

- moved init_modules after daemonize

Andrei Pelinescu-Onciul 23 anni fa
parent
commit
26bb8c8574
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      main.c

+ 4 - 4
main.c

@@ -801,10 +801,6 @@ int main(int argc, char** argv)
 	if (init_stats(  dont_fork ? 1 : children_no  )==-1) goto error;
 #endif
 	
-	if (init_modules() != 0) {
-		fprintf(stderr, "ERROR: error while initializing modules\n");
-		goto error;
-	}
 
 	print_rl();
 	/* fix routing lists */
@@ -904,6 +900,10 @@ int main(int argc, char** argv)
 	if (!dont_fork){
 		if ( daemonize(argv[0]) <0 ) goto error;
 	}
+	if (init_modules() != 0) {
+		fprintf(stderr, "ERROR: error while initializing modules\n");
+		goto error;
+	}
 
 	return main_loop();