Closed mpaperno closed 6 years ago
Yes, that looks good. Does the right thing on boot, and when manually sending SIGHUP.
You can see the PIDs change as the children are restarted, and the signal is logged.
$ ps aux | grep spam
_spampd 47176 1.4 0.3 98956 13432 p1 S 8:45AM 0:00.32 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
_spampd 623 0.5 0.1 98956 5988 p1 S 8:45AM 0:00.12 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
_spampd 29365 0.0 0.1 98956 4280 p1 S 8:45AM 0:00.11 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
_spampd 8800 0.1 0.1 98956 4384 p1 S 8:45AM 0:00.06 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
_spampd 82542 0.0 0.1 98956 4416 p1 S 8:45AM 0:00.12 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
_spampd 77062 0.0 0.1 98956 4480 p1 S 8:45AM 0:00.12 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
$ kill -HUP 47176
$ ps aux | grep spam
_spampd 47176 1.4 0.3 98956 13596 p1 S 8:45AM 0:00.57 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
_spampd 60223 0.0 0.1 98956 6128 p1 S 8:45AM 0:00.01 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
_spampd 34313 0.0 0.1 98956 4444 p1 S 8:45AM 0:00.18 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
_spampd 44661 0.0 0.1 98956 4516 p1 S 8:45AM 0:00.18 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
_spampd 87677 0.0 0.1 98956 4492 p1 S 8:45AM 0:00.05 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
_spampd 33057 0.0 0.1 98956 4536 p1 S 8:45AM 0:00.00 /usr/bin/perl -T /usr/local/sbin/spampd --port=10025 --relayhost=127.0.0.1:10027 --tagall --pid=/var/spampd/spampd.pid --homedir=/var/spa
$ tail /var/log/maillog
Aug 21 08:45:11 obsd spampd[47176]: Process Backgrounded
Aug 21 08:45:11 obsd spampd[47176]: 2018/08/21-08:45:11 SpamPD (type Net::Server::PreForkSimple) starting! pid(47176)
Aug 21 08:45:11 obsd spampd[47176]: Binding to TCP port 10025 on host 127.0.0.1 with IPv4
Aug 21 08:45:11 obsd spampd[47176]: Setting gid to "746 746"
Aug 21 08:45:11 obsd spampd[47176]: Setting uid to "746"
Aug 21 08:45:30 obsd spampd[47176]: Sending children hup signal
Thanks. Yes, same results here with kill -HUP
on Mint 18.3 and latest Net::Server (2.009).
Possible fix for #19