git://git.jankratochvil.net
/
nethome.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Basic formatting fixes.
[nethome.git]
/
bin
/
killall
1
#! /bin/sh
2
[ -x /usr/bin/killall ] && exec /usr/bin/killall "$@"
3
sig=""
4
if echo "$1" | grep >/dev/null -- '^-';then
5
sig="$1"
6
shift
7
fi
8
pgrep -l "$@"
9
if pkill $sig "$@";then true;else
10
echo "$*: no process killed"
11
exit 1
12
fi
13
if pgrep >/dev/null -l "$@";then
14
echo "FAIL:"
15
pgrep -l "$@"
16
else
17
echo OK
18
fi
19
exit 0