- 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
... | ... |
@@ -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; |