[milters] Archive

Lists Index Date Thread Search

Article: 536
From: Jamie Jones
Date: 2005-05-03 05:50:37 -0400
Subject: [SIQ] 001 milter-sender: why SIGQUIT on shutdown ?

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

The shutdown script for milter-sender has the following snippet:

|	NAME=`basename "$PROGRAM"`
|        announce("Stopping $NAME")
|
|	pid=`getpid "$PROGRAM"`
|	if test X"$pid" != X ; then
|		# The libmilter documentation specifies that only
|		# uncatchable signals can kill the milter, so no
|		# point in trying a clean shutdown. HUP, TERM, and
|		# INT are slow, in that they wait for connections
|		# to complete or for the next request by Sendmail.
|		kill -QUIT $pid
|
|		pid=`getpid "$PROGRAM"`
|		if test X"$pid" != X ; then
|			kill -KILL $pid

..

I'm not sure why you are doing a SIGQUIT, which will try and dump core,
when you are doing a SIGKILL afterwards anyway.

The clean shutdown *is* good, because it causes the latest cache.db
to be written (when using flatfiles, at least), and cleanly removes
the PID and socket files.

Additionally, if the clean shutdown does take too long, your "KILL"
which takes place a second later will sort that.

In other words, to me, replacing "kill -QUIT" with "kill -TERM" seems
a much better solution...

Cheers,
Jamie


Lists Index Date Thread Search