[Opendnssec-user] Deprecating pid-files?
Jakob Schlyter
jakob at kirei.se
Wed Aug 25 12:15:41 UTC 2010
On 25 aug 2010, at 14.06, Ondřej Surý wrote:
> Debian uses following snippet to stop the daemons:
>
> do_stop()
> {
> # Return
> # 0 if daemon has been stopped
> # 1 if daemon was already stopped
> # 2 if daemon could not be stopped
> # other if a failure occurred
> start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5
> --pidfile $PIDFILE
> RETVAL="$?"
> [ "$RETVAL" = 2 ] && return 2
>
> # Many daemons don't delete their pidfiles when they exit.
> rm -f $PIDFILE
> return "$RETVAL"
> }
This illustrates my problem quite well. In the OpenDNSSEC case you really want to ask the signer engine to exit nicely by running 'ods-signer stop'. You don't know if the signer engine has crash, left the PID-file and some other daemon taken its place.
jakob
More information about the Opendnssec-user
mailing list