16
16
*
17
17
*Copyright (c) 2001, PostgreSQL Global Development Group
18
18
*
19
- *$Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.8 2001/10/0105:36:13 tgl Exp $
19
+ *$Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.9 2001/10/0116:48:37 tgl Exp $
20
20
* ----------
21
21
*/
22
22
#include "postgres.h"
@@ -273,9 +273,22 @@ pgstat_start(int real_argc, char *real_argv[])
273
273
/*
274
274
* Then fork off the collector. Remember its PID for pgstat_ispgstat.
275
275
*/
276
+
277
+ fflush (stdout );
278
+ fflush (stderr );
279
+
280
+ #ifdef __BEOS__
281
+ /* Specific beos actions before backend startup */
282
+ beos_before_backend_startup ();
283
+ #endif
284
+
276
285
switch ((pgStatPid = (int )fork ()))
277
286
{
278
287
case -1 :
288
+ #ifdef __BEOS__
289
+ /* Specific beos actions */
290
+ beos_backend_startup_failed ();
291
+ #endif
279
292
perror ("PGSTAT: fork(2)" );
280
293
pgStatRunning = 0 ;
281
294
return -1 ;
@@ -289,6 +302,18 @@ pgstat_start(int real_argc, char *real_argv[])
289
302
}
290
303
291
304
/* in postmaster child ... */
305
+
306
+ #ifdef __BEOS__
307
+ /* Specific beos actions after backend startup */
308
+ beos_backend_startup ();
309
+ #endif
310
+
311
+ IsUnderPostmaster = true;/* we are a postmaster subprocess now */
312
+
313
+ /* Lose the postmaster's on-exit routines */
314
+ on_exit_reset ();
315
+
316
+ /* Close the postmaster's sockets, except for pgstat link */
292
317
ClosePostmasterPorts (false);
293
318
294
319
pgstat_main (real_argc ,real_argv );