ref: 883f9aaab94bddbc21be7675e4889489ce489ec6
parent: 6f8b37167d860b01d0a29525d9ba48482ba18bce
author: aiju <[email protected]>
date: Sun Jun 26 18:44:11 EDT 2011
fixed kill
--- a/rc/bin/kill
+++ b/rc/bin/kill
@@ -1,4 +1,8 @@
#!/bin/rc
+rfork e
+U=`{cat /dev/user}
for(i){
- ps | sed -n '/ '^$i^'$/s%^[^ ]* *([^ ]*).*%chmod 666 /proc/\1/ctl;echo kill > /proc/\1/ctl%p'
+ ps | sed -n '/^'$U' .* '$i'$/s%[^ ]* *%~>/proc/%
+ s% *.* (.*)%/note # \1%
+ s%~%echo kill%p'
}