1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

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.
This commit is contained in:
Neil Conway
2005-03-10 07:14:03 +00:00
parent e829f82223
commit 164adc4d39
7 changed files with 108 additions and 151 deletions

View File

@@ -265,7 +265,7 @@ beos_startup(int argc, char **argv)
/* The behavior of fork is borken on beos regarding shared memory. In fact
/* The behavior of fork is broken on beos regarding shared memory. In fact
all shared memory areas are clones in copy on write mode in the new process.
We need to do a remapping of these areas. Just afer the fork we performe the