[Mimedefang] multiple CPUs, multiple milters!

Cormack, Ken kcormack at acs.roadway.com
Thu Sep 11 08:37:01 EDT 2003


Just a comment about high PID numbers vs low PID numbers.  We cant always
assume that the lower PID is the parent.  As with all *nix variants, Linux
"wraps" PIDs, and at some point, you may see a child with a lower PID than
the parent process.  Granted, it's unlikely you'd see this with a service
started at boot, but if you ever needed to bounce the service without
rebooting, it could happen.

It's been so long (Back in May), that I had forgoten that I too, had
shutdown problems with this.  I had modified my /etc/rc.d/init.d/mimedang
script to use the following line, rather than "killproc $prog-multiplexor".

	kill -9 `ps -ef | grep mimedefang-mult | grep -v grep | awk '{ print
$2 }'`

Ken

-----Original Message-----
From: Anne Bennett [mailto:anne at encs.concordia.ca]
Sent: Wednesday, September 10, 2003 7:06 PM
To: mimedefang at lists.roaringpenguin.com
Subject: Re: [Mimedefang] multiple CPUs, multiple milters!



With respect to how to shutdown all processes/threads of the
MIMEDefang milter, David responds to my query:

>> I'll experiment with how to shutdown the processes.
> 
> On my machine, stopping the "main" thread stops them all.  Other
> people have reported problems, but I have never been able to duplicate
> them.

More detail: SIGTERM to "the first one" (the one with the
lowest-numbered PID, which appears in the pidfile) is ineffective:
none of them die.  SIGTERM to "the last one" (the one with the
highest-numbered PID) kills them all.  Weird!

Anyway, I've changed my boot start/stop script to

    su $MX_USER -c "pkill -U $MX_USER -x mimedefang"

at that point, and all's well.  (The "su" is just my paranoid
preference; none of those operations should need root privilege, so I
protect my system from inevitable programming mistakes.)

Thanks for your help!


Anne.
-- 
Ms. Anne Bennett, Senior Sysadmin, ENCS, Concordia University, Montreal H3G
1M8
anne at encs.concordia.ca                                    +1 514 848-2424
x2285
_______________________________________________
MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang



More information about the MIMEDefang mailing list