Whilst looking in to a bug with nagios2 (see bug #174466), I think there is a bug in the killproc() sub-routine within /lib/lsb/init-functions (from the lsb-base package). If an init script calls this sub-routine to issue a HUP siginal, the PID file is removed. For example:
killproc -p $THEPIDFILE $DAEMON 1
This causes an issue because the PID file is removed, even though a HUP is sent to the process and as a result, a future reload (e.g. /etc/init.d/nagios2 reload) causes two daemons to be spawned because the PID file has been removed so the daemon's init script believes the daemon has stopped.
Binary package hint: lsb-base
Whilst looking in to a bug with nagios2 (see bug #174466), I think there is a bug in the killproc() sub-routine within /lib/lsb/ init-functions (from the lsb-base package). If an init script calls this sub-routine to issue a HUP siginal, the PID file is removed. For example:
killproc -p $THEPIDFILE $DAEMON 1
This causes an issue because the PID file is removed, even though a HUP is sent to the process and as a result, a future reload (e.g. /etc/init.d/nagios2 reload) causes two daemons to be spawned because the PID file has been removed so the daemon's init script believes the daemon has stopped.