Browse Source

drouting: do not call init child for PROC_INIT

- avoid opening a database connection before forking
- reported by several people in context of Postgress async lib calls
Daniel-Constantin Mierla 15 years ago
parent
commit
907936449b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules_k/drouting/drouting.c

+ 1 - 1
modules_k/drouting/drouting.c

@@ -411,7 +411,7 @@ error:
 static int dr_child_init(int rank)
 {
 	/* only workers needs DB connection */
-	if (rank==PROC_MAIN || rank==PROC_TCP_MAIN)
+	if (rank==PROC_MAIN || rank==PROC_TCP_MAIN || rank==PROC_INIT)
 		return 0;
 
 	/* init DB connection */