Browse code

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
(cherry picked from commit 907936449b2543966a5b3b2fe821d406c2293799)

Daniel-Constantin Mierla authored on 30/11/2010 22:16:19
Showing 1 changed files
... ...
@@ -410,7 +410,7 @@ error:
410 410
 static int dr_child_init(int rank)
411 411
 {
412 412
 	/* only workers needs DB connection */
413
-	if (rank==PROC_MAIN || rank==PROC_TCP_MAIN)
413
+	if (rank==PROC_MAIN || rank==PROC_TCP_MAIN || rank==PROC_INIT)
414 414
 		return 0;
415 415
 
416 416
 	/* init DB connection */