[GH-ISSUE #36] rc.sendmailanalyzer not stopping corectly #29

Closed
opened 2026-05-05 15:00:20 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @sirydog81 on GitHub (Mar 13, 2016).
Original GitHub issue: https://github.com/darold/sendmailanalyzer/issues/36

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
Originally created by @sirydog81 on GitHub (Mar 13, 2016). Original GitHub issue: https://github.com/darold/sendmailanalyzer/issues/36 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 ```
Author
Owner

@darold commented on GitHub (Aug 31, 2016):

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

<!-- gh-comment-id:243911850 --> @darold commented on GitHub (Aug 31, 2016): Sorry for the response delay, commit 45957f1 applied your recommendation. Thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/sendmailanalyzer#29
No description provided.