httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: addition to the bugdb form
Date Tue, 26 Aug 1997 23:03:57 GMT
On Tue, 26 Aug 1997, Dean Gaudet wrote:

> I'm trying to find the linux package which advocates kill -9. 

Damnit.  It's redhat, the most common linux distribution, and it's not
just apache that they kill -9.  Here is one of the standard functions that
most of the /etc/rc.d/init.d scripts use:

# A function to stop a program.
killproc() {
        # Test syntax.
        if [ $# = 0 ]; then
                echo "Usage: killproc {program}"
                return 1
        fi

        # Save basename.
        base=`basename $1`

        # Find pid.
        pid=`pidofproc $base`

        # Kill it.
        if [ "$pid" != "" ] ; then
                echo -n "$base "
                kill -9 $pid
        fi

        # Remove pid file if any.
        rm -f /var/run/$base.pid
}

kill -9 baby.  I can't believe it. 

Dean



Mime
View raw message