Commit 79ee06c1 authored by Marc G. Fournier's avatar Marc G. Fournier

Fixes:

postgres backend processes end up as so called zombies. It seems that
only Linux a.out (libc.4.6.27) systems are affected.


By:

Wolfgang Roth <roth@statistik.uni-mannheim.de>
parent 87fffc43
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.44 1997/03/12 21:18:38 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.45 1997/04/24 20:27:46 scrappy Exp $
* *
* NOTES * NOTES
* *
...@@ -818,11 +818,15 @@ reaper(SIGNAL_ARGS) ...@@ -818,11 +818,15 @@ reaper(SIGNAL_ARGS)
fprintf(stderr, "%s: reaping dead processes...\n", fprintf(stderr, "%s: reaping dead processes...\n",
progname); progname);
#ifdef HAVE_WAITPID #ifdef HAVE_WAITPID
while((pid = waitpid(-1, &status, WNOHANG)) > 0) while((pid = waitpid(-1, &status, WNOHANG)) > 0) {
CleanupProc(pid, status); CleanupProc(pid, status);
pqsignal(SIGCHLD, reaper);
}
#else #else
while((pid = wait3(&statusp, WNOHANG, NULL)) > 0) while((pid = wait3(&statusp, WNOHANG, NULL)) > 0) {
CleanupProc(pid, statusp.w_status); CleanupProc(pid, statusp.w_status);
pqsignal(SIGCHLD, reaper);
}
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment