[Mimedefang] RE: mimedefang shutdown signal handling

Paul Whittney pwhittney at net.bacconsulting.com
Wed Mar 31 11:37:20 EST 2004


Matt,

Thanks for your response.

In a mailing list, I never worry about the speed of replies, nor do I
expect to get a response (hey, we're all busy on other things, I'm
sure). Then, if I get a response, I'm always thankful for it ;-)

I still have the problem, but I get around it with a 
'killall mimedefang' after the '/etc/rc.d/rc/mimedefang stop'

I'll grab the redhat scripts for the init scripts and have a look
through the daemon shell script function. Thanks for that idea (would
never have occurred to me). I don't use Redhat, but Slackware (although
its gone through so many change by myself, that perhaps its no longer
that either), but they all run shell scripts.

I'm glad its just a small problem (you're the only one who's had an
issue, other than me) which is a good thing, and shows that its to do
with my machine config, and not mimedefang.

I did dig through the mimedefang.c and mimedefang-muliplexor.c and found
a very small difference;

mimedefang-muliplexor handles SIGTERM (line:978) via sigterm (def
at:2284) and I see the syslog line in my logs, but mimedefang.c catches
no signals (well, only if not compiled with ENABLE_DEBUGGING). 

Although, it does have signal.h included in the main section at
line 52, but then includes it again if ENABLE_DEBUGGING is defined (line
76), which I suppose is because regardless of ENABLE_DEBUGGING signal.h
is required to say 'ignore SIGHUP'.

I can see why it doesn't handle SIGHUP (no need to re-read
anything), so I'm assuming that SIGTERM is handled implicitly?

Also, why does it spawn 2 children? (that may be a c coding question,
that could be considered off topic... but I was thinking it.)

Again, thanks for the input Matt.

-Paul Whittney

On Wed, Mar 31, 2004 at 01:04:05PM +1000, Matt Smith wrote:
> Hi Paul,
> 
> Apologies for the delay in the reply, just read your problem then, and
> apologies again if it has been solved since.
> 
> It turned out that the init script I was using was the fault.  I copied the
> Redhat init script, started MD through that, stopped it, and lo and behold
> all stopped.
> 
> daemon $PROGDIR/$prog -P /var/spool/MIMEDefang/$prog.pid



More information about the MIMEDefang mailing list