소스 검색

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 15 년 전
부모
커밋
405466638c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules_k/drouting/drouting.c

+ 1 - 1
modules_k/drouting/drouting.c

@@ -410,7 +410,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 */