diff options
Diffstat (limited to 'src/backend/postmaster/fork_process.c')
-rw-r--r-- | src/backend/postmaster/fork_process.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/backend/postmaster/fork_process.c b/src/backend/postmaster/fork_process.c index 4064d7ccd41..54395b06546 100644 --- a/src/backend/postmaster/fork_process.c +++ b/src/backend/postmaster/fork_process.c @@ -1,13 +1,13 @@ /* * fork_process.c - * A simple wrapper on top of fork(). This does not handle the - * EXEC_BACKEND case; it might be extended to do so, but it would be - * considerably more complex. + * A simple wrapper on top of fork(). This does not handle the + * EXEC_BACKEND case; it might be extended to do so, but it would be + * considerably more complex. * * Copyright (c) 1996-2005, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/postmaster/fork_process.c,v 1.3 2005/03/16 00:02:39 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/postmaster/fork_process.c,v 1.4 2005/10/15 02:49:23 momjian Exp $ */ #include "postgres.h" #include "postmaster/fork_process.h" @@ -25,29 +25,29 @@ pid_t fork_process(void) { - pid_t result; + pid_t result; + #ifdef LINUX_PROFILE struct itimerval prof_itimer; #endif /* - * 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. + * 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(stdout); fflush(stderr); #ifdef LINUX_PROFILE + /* - * Linux's fork() resets the profiling timer in the child process. If - * we want to profile child processes then we need to save and restore - * the timer setting. This is a waste of time if not profiling, - * however, so only do it if commanded by specific -DLINUX_PROFILE - * switch. + * Linux's fork() resets the profiling timer in the child process. If we + * want to profile child processes then we need to save and restore the + * timer setting. This is a waste of time if not profiling, however, so + * only do it if commanded by specific -DLINUX_PROFILE switch. */ getitimer(ITIMER_PROF, &prof_itimer); #endif @@ -81,4 +81,5 @@ fork_process(void) return result; } -#endif /* ! WIN32 */ + +#endif /* ! WIN32 */ |