aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1998-11-29 01:51:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1998-11-29 01:51:56 +0000
commit79fcde48b229534fd4a5e07834e5e0e84dd38bee (patch)
tree6110eed40d798c0eec3fac1bd383e55de524e3ad /src
parent9e0e148a83c5348b4b72b855d3715c7155301f60 (diff)
downloadpostgresql-79fcde48b229534fd4a5e07834e5e0e84dd38bee.tar.gz
postgresql-79fcde48b229534fd4a5e07834e5e0e84dd38bee.zip
Portability fix for old SunOS releases: fflush(NULL)
doesn't work there. Fortunately the postmaster only has stdout and stderr to flush.
Diffstat (limited to 'src')
-rw-r--r--src/backend/postmaster/postmaster.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 07e5060f309..8c35f6eeb6c 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.97 1998/09/01 04:31:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.98 1998/11/29 01:51:56 tgl Exp $
*
* NOTES
*
@@ -1289,10 +1289,14 @@ BackendStartup(Port *port)
}
/*
- * Flush all stdio channels just before fork, to avoid double-output
- * problems.
+ * Flush stdio channels just before fork, to avoid double-output problems.
+ * Ideally we'd use fflush(NULL) here, but there are still a few non-ANSI
+ * stdio libraries out there (like SunOS 4.1.x) that coredump if we do.
+ * Presently stdout and stderr are the only stdio output channels used
+ * by the postmaster, so fflush'ing them should be sufficient.
*/
- fflush(NULL);
+ fflush(stdout);
+ fflush(stderr);
if ((pid = fork()) == 0)
{ /* child */