]> git.lizzy.rs Git - plan9front.git/blobdiff - rc/bin/dontkill
fstype: make copy of first sector in /env to avoid unaligned reads on the disk (for...
[plan9front.git] / rc / bin / dontkill
index 3dc79b940cfcbc555057aa026d4d416a74dc3d6d..86395afada8286b72ec32dd4482ce162ab69ae16 100755 (executable)
@@ -6,6 +6,6 @@ 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'/ {
+print "@{echo noswap >/proc/"$2"/ctl}"
+}' | rc >/dev/null >[2=1]