Re: how to write daemons that sysadmins will hate
"Chris K. Young" <[email protected]> 2 May 2003 13:17:50 +1159
| Newsgroups | gmane.org.djb.miscellaneous |
|---|---|
| Message-ID | <[email protected]> |
Quoted from Paul Jarc [02 May 2003]: > multilog doesn't see EOF when a service closes its logging descriptor; > svscan and supervise still have the writing end of the pipe open. This only works if the daemon is writing to a pipe set up by svscan (which, after all, is the process keeping the pipe open), which in turn means that the process must successfully write to standard output (or standard error). If the process has closed standard output/error, I have to resort to other means, such as writing to a FIFO directly (by name). I normally do this by having a supervised multilog read from said FIFO. In such a setup, the multilog process would, indeed, see the end of file. I can't really see a way to keep the pipe open, because we don't have a long-lived process like svscan to do that anymore. I would be interested to see if there actually is a way to do this. I will clarify this point on my page; thanks for pointing it out! > > Feel free to suggest pet peeves of your own! :-) > > Inverse of: > <URL:http://homepages.tesco.net./~J.deBoynePollard/FGA/unix-daemon-design-mistakes-to-avoid.html> I am glad to see that that page expands on many of my points in detail. In fact, I like it so much that I'll be linking to it from my page. :-) Thanks, ---Chris K. -- Chris, the Young One |_ I think computers are as vague as humans...you can't Auckland, New Zealand |_ say, "what gender are humans".... ---Bobby http://cloud9.hedgee.com/ |_