httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <>
Subject Re: latest redhat rpm of apache
Date Fri, 02 Jan 1998 04:19:29 GMT
On Thu, Jan 01, 1998 at 09:45:17AM -0700, Marc Slemko wrote:
> On Thu, 1 Jan 1998, Manoj Kasichainula wrote:
> > I've mentioned this to them. In my RPMs, I've always eliminated the
> > first three killall's, and I'm planning to change the fourth to a USR1
> > signal.
> Does it compress the logs at all?

Hmmm. It doesn't by default, but it can, through an option in the
logrotate config files. I guess that I should keep the signal as HUP
then.  I don't know what will happen to logrotate if it is kept
waiting for a sleep command, so I'd rather not use that to wait for
the logs.

> > > (no idea what killproc does...)
> > 
> > The same thing as killall, but killproc is guaranteed to be available
> > in rc.d scripts, while killall may never be available.
> And what signal does it use?  TERM?

TERM, then KILL eventually (by default). Here's the relevant snippet
of code:

            # TERM first, then KILL if not dead
            kill -TERM $pid
            usleep 100000
            dead=`ps aux | awk '{print $2}' | grep $pid`
            if [ "$dead" != "" ]; then
                sleep 3
                kill -KILL $pid

Could be improved a bit, but it should be okay. FYI, killall uses TERM
by default.

> > > but restart is the silly:
> > > 
> > >   restart)
> > >         $0 stop
> > >         $0 start
> > >         ;;
> > 
> > Fixing this too. Will use -USR1.
> You may want to consider -HUP because understanding what -USR1 does and
> doesn't do can take more brainpower than HUP does.  If people want to use
> it for logfile rotations of their own, etc. -USR1 could mess them up.

Okay. Will do. One thing I need to find out though is what semantics
restart is supposed to have, i.e. whether it's supposed to start the
server if it hasn't been started or if it is unspecified.

I'm kind of wary about throwing around a lot of SIGHUPs, since each
one kills off all connections. But, anyone running a really important
web server is probably not using an RPM anyway, or at least will edit

Manoj Kasichainula - manojk at io dot com -
"Would you die for The One?"
"I wouldn't get pizza for the one. That ain't my job." - J.M. Straczynski

View raw message