]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fixes:
authorMarc G. Fournier <scrappy@hub.org>
Thu, 24 Apr 1997 20:27:46 +0000 (20:27 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Thu, 24 Apr 1997 20:27:46 +0000 (20:27 +0000)
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>

src/backend/postmaster/postmaster.c

index 5c749c5f3537520afc3c262e66f7f3c1c97a8131..e2a296a379fcf5038a49071aa4b097994b750945 100644 (file)
@@ -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
 }