mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-18 22:15:46 +01:00
2a3e3873a1
Level up WARNS
17 lines
364 B
Bash
Executable File
17 lines
364 B
Bash
Executable File
#! /bin/sh
|
|
# $Id: killall,v 1.3 2012/06/29 09:39:19 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
|
|
fi
|
|
done
|