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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux