Added ukill(1): Kills all processes started by a user
This commit is contained in:
parent
aa0a20ed6e
commit
e8c3eb87d2
1 changed files with 12 additions and 0 deletions
12
rc/bin/ukill
Normal file
12
rc/bin/ukill
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/rc
|
||||
rfork e
|
||||
if(~ $#1 0){
|
||||
USER=`{cat /dev/user}
|
||||
}
|
||||
if not {
|
||||
USER=$1
|
||||
}
|
||||
PROCS=`{ps | grep $USER | awk '{print $2}'}
|
||||
for(i in $PROCS){
|
||||
echo '@{echo kill>/proc/'^$i^'/note}'
|
||||
}
|
Loading…
Reference in a new issue