Sophie

Sophie

distrib > Mandriva > 9.1 > i586 > by-pkgid > a98d94aea8f8543cb7be00ff60cf2ddb > files > 59

cdialog-0.9b-2mdk.i586.rpm

#! /bin/sh
# Linux has a program that does this correctly.
for prog in $*
do
	pid=`ps -a |fgrep $prog |fgrep -v fgrep|cut -f 1 -d ' ' `
	if test -n "$pid" ; then
		echo killing pid=$pid, $prog
		kill -1 $pid || \
		kill -15 $pid || \
		kill -9 $pid
	fi
done