diff options
Diffstat (limited to 'contrib/dialog/samples/killall')
-rwxr-xr-x | contrib/dialog/samples/killall | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/contrib/dialog/samples/killall b/contrib/dialog/samples/killall index 7030fe2..9d233f0 100755 --- a/contrib/dialog/samples/killall +++ b/contrib/dialog/samples/killall @@ -1,16 +1,13 @@ #! /bin/sh -# $Id: killall,v 1.3 2012/06/29 09:39:19 tom Exp $ +# $Id: killall,v 1.2 2004/09/17 19:56:18 tom Exp $ # Linux has a program that does this correctly. - -. ./setup-vars - for prog in $* do pid=`ps -a |fgrep $prog |fgrep -v fgrep|sed -e 's/^[ ]*//' -e 's/ .*//' ` if test -n "$pid" ; then echo killing pid=$pid, $prog - kill -$SIG_HUP $pid || \ - kill -$SIG_TERM $pid || \ - kill -$SIG_KILL $pid + kill -1 $pid || \ + kill -15 $pid || \ + kill -9 $pid fi done |