[Mimedefang] mimedefang shutdown signal handling
Paul Whittney
pwhittney at net.bacconsulting.com
Fri Mar 26 12:18:59 EST 2004
I'm convinced that I have made an error in the make script, or have an
issue with my perl install, but I thought I'd ask the list in case anyone
else has had this issue, and managed to fix it.
Using the init script with mimedefang (versions 2.39, 2.40, and 2.41) I
am able to start and stop the mimedefang processes (mainly because I'm
testing all sorts of perl scripts away from the main system), however,
mimedefang doesn't shutdown following the kill signal, but mimedefang
does not. I have tried killing the process manually, but I have to use
kill -9 <mimedefang process>.
I've got the sh -x output of the init-script (in the examples directory)
following a start.
mimedefang multiplexor starts up with:
/usr/local/bin/mimedefang-multiplexor -p \
/var/run/defang/mimedefang-multiplexor.pid -m 2 -x 7 \
-U defang -i 300 -b 600 -R 10000 -M 30000 -l -s \
/var/spool/MIMEDefang/mimedefang-multiplexor.sock
mimedefang-multiplexor.pid is 3598
/usr/local/bin/mimedefang -P /var/run/defang/mimedefang.pid -m \
/var/spool/MIMEDefang/mimedefang-multiplexor.sock -U defang -t \
-x MIMEDefang-2.41-ns2.redsky.net -p /var/spool/MIMEDefang/mimedefang.sock
mimedefang.pid is 3610
Looking at the process listing (I've removed a bit of info...)
UID PID PPID C STIME TTY TIME CMD
defang 3598 1 0 09:48 ? 00:00:00 /usr/local/bin/mimedefang-multiplexor
defang 3599 3598 33 09:48 ? 00:00:13 /usr/bin/perl
/usr/local/bin/mimedefang.pl -server
defang 3610 1 0 09:48 ? 00:00:00 /usr/local/bin/mimedefang
defang 3611 3610 0 09:48 ? 00:00:00 /usr/local/bin/mimedefang
defang 3612 3611 0 09:48 ? 00:00:00 /usr/local/bin/mimedefang
defang 3613 3598 35 09:48 ? 00:00:13 /usr/bin/perl
/usr/local/bin/mimedefang.pl -server
Then, issuing the stop command, I see the following in the sh -x output:
+ test -f /var/run/defang/mimedefang.pid
++ cat /var/run/defang/mimedefang.pid
+ kill 3610
+ RETVAL=0
+ '[' 0 = 0 ']'
+ echo '[ OK ]'
and:
+ test -f /var/run/defang/mimedefang-multiplexor.pid
++ cat /var/run/defang/mimedefang-multiplexor.pid
+ kill 3598
+ RETVAL=0
+ '[' 0 = 0 ']'
+ echo '[ OK ]'
but looking at the ps output:
UID PID PPID C STIME TTY TIME CMD
defang 3610 1 0 09:48 ? 00:00:00 /usr/local/bin/mimedefang
defang 3611 3610 0 09:48 ? 00:00:00 /usr/local/bin/mimedefang
defang 3612 3611 0 09:48 ? 00:00:00 /usr/local/bin/mimedefang
I think I'm lacking the skills of debugging this, and if it's effecting
everyone, then people would notice old processes hanging around.
Anyone able to offer any hints on process debugging?
-Paul Whittney
More information about the MIMEDefang
mailing list