mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
allow kill of pids. recognize -sig.
This commit is contained in:
parent
ead3e31153
commit
f9bca6a2a4
1 changed files with 9 additions and 1 deletions
10
bin/kill
10
bin/kill
|
@ -1,6 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
sig=""
|
||||||
|
case "$1" in
|
||||||
|
-*)
|
||||||
|
sig=" $1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
psu | awk '$NF ~ /^('$i')$/ {printf("/bin/kill %d # %s\n", $2, $0);}'
|
psu | awk '$NF == "'"$i"'" || $2 == "'"$i"'" {printf("/bin/kill%s %d # %s\n", "'"$sig"'", $2, $0);}'
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue