Quoting Steve Langasek ([EMAIL PROTECTED]):

> I don't think this correctly handles the case where start-stop-daemon
> /fails/; we don't want to remove the pid file in that case, we want to leave
> it in place since that indicates the daemon is still running for some
> reason.


Well, coming back to that bug.

"My" init script mimics what we're doing in samba's init script:

                # Wait a little and remove stale PID file
                sleep 1
                if [ -f $WINBINDDPID ] && ! ps h `cat $WINBINDDPID` > /dev/null
                then
                        # Stale PID file (winbindd was succesfully stopped),
                        # remove it (should be removed by winbindd itself)
                        rm -f $WINBINDDPID
                fi
                ;;


The 'ps' command is indeed meant to check if the winbind process with
the said PID is still running and only removes the PID file if it
isn't.

That seems correct to me. Isn't it correct?


Attachment: signature.asc
Description: Digital signature

Reply via email to