Source-Changes-HG archive

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

[src/trunk]: src/etc Fix waiting for PIDs on stop.



details:   https://anonhg.NetBSD.org/src/rev/79b4aea3b34a
branches:  trunk
changeset: 944091:79b4aea3b34a
user:      otis <otis%NetBSD.org@localhost>
date:      Thu Sep 17 20:29:03 2020 +0000

description:
Fix waiting for PIDs on stop.

Fix expansion of positional parameters. Also move the local
variable declaration to more apropriate place.

diffstat:

 etc/rc.subr |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r a727d466b3d9 -r 79b4aea3b34a etc/rc.subr
--- a/etc/rc.subr       Thu Sep 17 20:26:22 2020 +0000
+++ b/etc/rc.subr       Thu Sep 17 20:29:03 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.104 2020/04/05 21:03:08 christos Exp $
+# $NetBSD: rc.subr,v 1.105 2020/09/17 20:29:03 otis Exp $
 #
 # Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -322,7 +322,7 @@
 {
        local signal=$1
        shift
-       local list="$@"
+       local list="$*"
        local j=
        local nlist=
        for j in $list; do
@@ -343,14 +343,15 @@
 {
        local ntries=0
        local prefix=
-       local list="$@"
+       local nlist=
+       local list="$*"
 
        if [ -z "$list" ]; then
                return
        fi
 
        while true; do
-               local nlist=$(kill_pids 0 $list)
+               nlist=$(kill_pids 0 $list)
                if [ -z "$nlist" ]; then
                        break
                fi



Home | Main Index | Thread Index | Old Index