|
From: Kevin Z. <kev...@gm...> - 2015-02-16 03:30:45
|
Hi Richard, Thanks for looking into this issue. On 02/15/2015 20:12, Richard Johnson wrote: > sshguard.c includes SIGHUP in its signals upon which to terminate. > > The rc.d startup of sshguard at boot on OpenBSD (and FreeBSD) apparently > comes with a HUP. Sheer guessing here, but this may be because sshguard > has the log file open at the time an initial newsyslog run occurs. I'm running FreeBSD, but I don't start SSHGuard using 'rc.d' since I'm starting a development version manually every boot. I'm not sure why SIGHUP is being sent. I'll look around... > Here's a quick workaround that'll hopefully hold me until there's more time > for reading code and figuring out how to avoid HUPing sshguard at boot > time. It effectively ignores SIGHUP. Confirmed that on OpenBSD 5.6 stable > sshguard is still shut down cleanly at reboot time, as well as stops and > starts fine via /etc/rc.d/sshguard stop|start|restart. > > ======= > --- src/sshguard.c.orig Wed Feb 9 05:01:47 2011 > +++ src/sshguard.c Sun Feb 15 18:30:59 2015 > @@ -200,7 +200,6 @@ > > /* termination signals */ > signal(SIGTERM, sigfin_handler); > - signal(SIGHUP, sigfin_handler); > signal(SIGINT, sigfin_handler); > > /* load blacklisted addresses and block them (if requested) */ Doesn't the default SIGHUP handler terminate the process? Thanks, Kevin Zheng -- Kevin Zheng kev...@gm... | ke...@kd... | PGP: 0xC22E1090 |