dontkill: ignore errors

This commit is contained in:
cinap_lenrek 2011-08-27 18:39:14 +02:00
parent 9403363364
commit 3c74700c7a

View file

@ -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]