aboutsummaryrefslogtreecommitdiff
path: root/src/include/postmaster/fork_process.h
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2005-03-10 07:14:03 +0000
committerNeil Conway <neilc@samurai.com>2005-03-10 07:14:03 +0000
commit164adc4d3924d5f0310dba24d4035313ca69245d (patch)
tree4a7dfc4714ac642f31b1a60d31ecdc4ba1d59065 /src/include/postmaster/fork_process.h
parente829f822239186df59829afae5cc2769b783630b (diff)
downloadpostgresql-164adc4d3924d5f0310dba24d4035313ca69245d.tar.gz
postgresql-164adc4d3924d5f0310dba24d4035313ca69245d.zip
Refactor fork()-related code. We need to do various housekeeping tasks
before we can invoke fork() -- flush stdio buffers, save and restore the profiling timer on Linux with LINUX_PROFILE, and handle BeOS stuff. This patch moves that code into a single function, fork_process(), instead of duplicating it at the various callsites of fork(). This patch doesn't address the EXEC_BACKEND case; there is room for further cleanup there.
Diffstat (limited to 'src/include/postmaster/fork_process.h')
-rw-r--r--src/include/postmaster/fork_process.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/postmaster/fork_process.h b/src/include/postmaster/fork_process.h
new file mode 100644
index 00000000000..945de366711
--- /dev/null
+++ b/src/include/postmaster/fork_process.h
@@ -0,0 +1,8 @@
+#ifndef FORK_PROCESS_H
+#define FORK_PROCESS_H
+
+#include "postgres.h"
+
+extern pid_t fork_process(void);
+
+#endif /* ! FORK_PROCESS_H */