On Thu, May 16, 2002 at 07:27:46PM -0700, Manoj Kasichainula wrote: > On Wed, May 15, 2002 at 12:49:46PM -0701, Jos Backus wrote: > > It would be great to have a BSD-licensed version of > > something like djb's daemontools. > > I've (mostly) written replacements for supervise, setuidgid, and > tcpserver. They use Single Unix APIs, haven't been ported to APR, and > have no docs yet, but they are working for me. > > I imagine porting them to APR wouldn't be too painful, though they > wouldn't remain the svelte 4-8kB binaries they are today. :)
Interesting. I'm not sure how much benefit there would be from using APR though. > supervise /var/supervise/producer | supervise /var/supervise/consumer Thanks for the nice explanations. > In my supervise replacement, I use a technique picked up from the > Awesome Might that is Dean (and which was used in some of the early > MPMs). Create a pipe, and keep both ends of it. Create a signal > handler for SIGCHLD that writes to the pipe. And, in the select() call > you reference, wait on both the sigchld pipe (a.k.a. pipe_of_death) > and the named fifo. This sounds like the self-pipe trick (see http://cr.yp.to/docs/selfpipe.html). Neat. > Are people interested in this code? I for one would be interested in seeing this. I may be able to sell this to the FreeBSD people for inclusion in the base OS if the license allows it. Do you also have equivalents to svc, svstat and svok? -- Jos Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ [EMAIL PROTECTED] _/_/ _/_/_/ use Std::Disclaimer;