diff --git a/rc/bin/dontkill b/rc/bin/dontkill index 3dc79b940..1cdbad721 100755 --- a/rc/bin/dontkill +++ b/rc/bin/dontkill @@ -6,6 +6,9 @@ if (! ~ $#* 1) { exit usage } # see /sys/src/9/port/proc.c:/^killbig -pids=`{psu | awk '$NF ~ /'$1'/ {print $2}'} -~ $#pids 0 || {for(p in /proc/^$pids^/ctl){chmod +w $p; echo noswap >$p; chmod -w $p}} >/dev/null >[2=1] - +psu | awk '$NF ~ /'$1'/ { +c="/proc/"$2"/ctl" +print "chmod +w "c +print "echo noswap >"c +print "chmod -w "c +}' | rc >/dev/null >[2=1]