From 3c74700c7a15b6f6f46f42c377cf4b7229dfd9d0 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 27 Aug 2011 18:39:14 +0200 Subject: [PATCH] dontkill: ignore errors --- rc/bin/dontkill | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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]