Browse code

[backport from unstable]

- fix: db connections should not be opened from child_init(PROC_MAIN),
or they will be inherited by all the tcp processes (bad). Bug reported by
Jan Andres <jan.andres@freenet-ag.de>.

closes SER-227

Andrei Pelinescu-Onciul authored on 23/02/2007 21:19:30
Showing 3 changed files
... ...
@@ -69,7 +69,7 @@ MAIN_NAME=ser
69 69
 VERSION = 2
70 70
 PATCHLEVEL = 0
71 71
 SUBLEVEL =   0
72
-EXTRAVERSION = -rc0
72
+EXTRAVERSION = -rc1
73 73
 
74 74
 SER_VER = $(shell expr $(VERSION) \* 1000000 + $(PATCHLEVEL) \* 1000 + \
75 75
 			$(SUBLEVEL) )
... ...
@@ -146,6 +146,7 @@ extern int process_no;
146 146
 extern int reply_to_via;
147 147
 
148 148
 extern int is_main;
149
+extern int fixup_complete;
149 150
 
150 151
 /* debugging level for dumping memory status */
151 152
 extern int memlog;
... ...
@@ -422,6 +422,7 @@ extern int yyparse();
422 422
 
423 423
 
424 424
 int is_main=1; /* flag = is this the  "main" process? */
425
+int fixup_complete=0; /* flag = is the fixup complete ? */
425 426
 
426 427
 char* pid_file = 0; /* filename as asked by use */
427 428
 char* pgid_file = 0;
... ...
@@ -1591,6 +1592,7 @@ try_again:
1591 1592
 						r);
1592 1593
 		goto error;
1593 1594
 	};
1595
+	fixup_complete=1;
1594 1596
 
1595 1597
 #ifdef STATS
1596 1598
 	if (init_stats(  dont_fork ? 1 : children_no  )==-1) goto error;