Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sup/source don't decrement if children are 0



details:   https://anonhg.NetBSD.org/src/rev/ae01ec387c2f
branches:  trunk
changeset: 763355:ae01ec387c2f
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Mar 17 19:43:34 2011 +0000

description:
don't decrement if children are 0

diffstat:

 usr.sbin/sup/source/supfilesrv.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 6ea956410aab -r ae01ec387c2f usr.sbin/sup/source/supfilesrv.c
--- a/usr.sbin/sup/source/supfilesrv.c  Thu Mar 17 19:06:45 2011 +0000
+++ b/usr.sbin/sup/source/supfilesrv.c  Thu Mar 17 19:43:34 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: supfilesrv.c,v 1.45 2011/03/16 20:17:00 christos Exp $ */
+/*     $NetBSD: supfilesrv.c,v 1.46 2011/03/17 19:43:34 christos Exp $ */
 
 /*
  * Copyright (c) 1992 Carnegie Mellon University
@@ -495,9 +495,11 @@
                if (kill(pid, 0) == -1)
                        switch (errno) {
                        case ESRCH:
-                               if (nchildren == 0)
+                               if (nchildren == 0) {
                                        logerr("no children but pid %jd\n",
                                            (intmax_t)pid);
+                                       break;
+                               }
                                nchildren--;
                                break;
                        default:



Home | Main Index | Thread Index | Old Index