kill,slay,Kill: run note/ctl write in subshell

This commit is contained in:
cinap_lenrek 2011-08-27 21:51:41 +02:00
parent 011de5158a
commit 41a4cd88eb
3 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
#!/bin/rc
for(i){
ps | sed -n '/ '^$i^'$/s%^[^ ]* *([^ ]*).*%chmod 666 /proc/\1/ctl;echo kill > /proc/\1/ctl%p'
ps | sed -n '/ '^$i^'$/s%^[^ ]* *([^ ]*).*%chmod 666 /proc/\1/ctl;@{echo kill>/proc/\1/ctl}%p'
}

View file

@ -3,6 +3,6 @@ rfork e
U=`{cat /dev/user}
for(i){
ps | sed -n '/^'$U' .* '$i'$/s%[^ ]* *%~>/proc/%
s% *.* (.*)%/note # \1%
s%~%echo kill%p'
s% *.* (.*)%/note} # \1%
s%~%@{echo kill%p'
}

View file

@ -2,6 +2,6 @@
U=`{cat /dev/user}
for(i){
ps | sed -n '/^'$U' .* '$i'$/s%[^ ]* *%~>/proc/%
s% *.* (.*)%/ctl # \1%
s%~%echo kill%p'
s% *.* (.*)%/ctl} # \1%
s%~%@{echo kill%p'
}