|
10 | 10 | * |
11 | 11 | * |
12 | 12 | * IDENTIFICATION |
13 | | - * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.97 1998/09/01 04:31:21 momjian Exp $ |
| 13 | + * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.98 1998/11/29 01:51:56 tgl Exp $ |
14 | 14 | * |
15 | 15 | * NOTES |
16 | 16 | * |
@@ -1289,10 +1289,14 @@ BackendStartup(Port *port) |
1289 | 1289 | } |
1290 | 1290 |
|
1291 | 1291 | /* |
1292 | | - * Flush all stdio channels just before fork, to avoid double-output |
1293 | | - * problems. |
| 1292 | + * Flush stdio channels just before fork, to avoid double-output problems. |
| 1293 | + * Ideally we'd use fflush(NULL) here, but there are still a few non-ANSI |
| 1294 | + * stdio libraries out there (like SunOS 4.1.x) that coredump if we do. |
| 1295 | + * Presently stdout and stderr are the only stdio output channels used |
| 1296 | + * by the postmaster, so fflush'ing them should be sufficient. |
1294 | 1297 | */ |
1295 | | -fflush(NULL); |
| 1298 | +fflush(stdout); |
| 1299 | +fflush(stderr); |
1296 | 1300 |
|
1297 | 1301 | if ((pid=fork())==0) |
1298 | 1302 | {/* child */ |
|