darold / sendmailanalyzer

Sendmail log Analyzer is a tool to monitor sendmail usage and generate HTML and graph reports. It reports all you ever wanted to know about email trafic on your network. You can also use it in ISP environment with per domain and per mailbox report.
http://sendmailanalyzer.darold.net/
GNU General Public License v3.0
76 stars 13 forks source link

rc.sendmailanalyzer not stopping corectly #36

Closed sirydog81 closed 8 years ago

sirydog81 commented 8 years ago

i see there are two process running, a parent and a child

#ps -auxf
root      3662  0.0  0.2   7668  4924 ?        Ss   12:25   0:00 sendmailanalyzer
root      3663  0.0  0.0   1972   568 ?        S    12:25   0:00  \_ /usr/bin/tail -n 0 -F /var/log/maillog

rc.sendmailanalyzer stop is trying to stop process 3662 that is saved in the sendmailanalyzer.pid file. In my case it always fails. Even if if i force kill the parent, the child still remains and becomes a zombie.

Both processes belong to same PGID

# ps x -o  "%p %r %c"
  PID  PGID COMMAND
 3662  3662 sendmailanalyze
 3663  3662 tail

so i modified the script to kill all processes belonging to that GPID:

kill **-- -**$pid 1> /dev/null 2> /dev/null
darold commented 8 years ago

Sorry for the response delay, commit 45957f1 applied your recommendation. Thanks.