diff options
author | Marc G. Fournier <scrappy@hub.org> | 1997-04-24 20:27:46 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1997-04-24 20:27:46 +0000 |
commit | 79ee06c186e26e244e6e015546aa0755140fe3f1 (patch) | |
tree | 4ee0b4b040b9d88d6e26c450fae654ed8e71f35c /src | |
parent | 87fffc4342016b1ef50b35553521e70dc9bfc057 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 5c749c5f353..e2a296a379f 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -10,7 +10,7 @@ * * * 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 * @@ -818,11 +818,15 @@ reaper(SIGNAL_ARGS) fprintf(stderr, "%s: reaping dead processes...\n", progname); #ifdef HAVE_WAITPID - while((pid = waitpid(-1, &status, WNOHANG)) > 0) + while((pid = waitpid(-1, &status, WNOHANG)) > 0) { CleanupProc(pid, status); + pqsignal(SIGCHLD, reaper); + } #else - while((pid = wait3(&statusp, WNOHANG, NULL)) > 0) + while((pid = wait3(&statusp, WNOHANG, NULL)) > 0) { CleanupProc(pid, statusp.w_status); + pqsignal(SIGCHLD, reaper); + } #endif } |