in a similar vein, this script can be quite useful. the special case for factotum allows for restarting most services typically started from cpurc from the console.
; cat /bin/killuser
#!/bin/rc
rfork en
for(i){
f=dummy
while(! ~ $#f 0){
f=`{ps|awk '$1 == ENVIRON["i"] && $NF != "factotum" {print $2}'}
for(p in $f){
chmod a+rw /proc/$p/ctl &&
echo kill > /proc/$p/ctl
}
}
}
- erik
