Re: service; ps & grep help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2008-09-08 at 11:09 +1000, Cameron Simpson wrote:
> I would much rather keep a caretaker process around. If our concern is
> that the daemon dies, badly enough that it doesn't tidy up its pid
> file
> (probable if the daemon isn't responsible for the pidfile in the first
> place:-) then I like this:
> 
>   ( start daemon &
>     echo $! >/var/run/the-daemon.pid
>     wait
>     rm /var/run/the-daemon.pid
>   ) &
> 
> That way the pid file should get removed if the daemon dies. Unless
> something takes out the caretaker subshell (requires special effort,
> or a disaster:-) the pid file will be reliably removed.

Yes, that would work. Of course all this would be unnecessary if process
ids were nonces, i.e. never repeated during the lifetime of the system,
but that would be a pretty big change.

poc

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux