Emulate pipe-tools' finish script using daemontools?

Jos Backus <[email protected]> Wed, 28 Jun 2006 17:43:32 -0700
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
I have a situation where depending on how the run script exited, different
things need to be done.

http://www.skarnet.org/software/pipe-tools/npt-supervise.html says:

"Whenever ./run exits, npt-supervise tries and start ./finish if it exists.
The exit code and exit status from ./run is given as arguments to ./finish."

So this is a solution for pipe-tools but the author says not to use it
("pipe-tools needs to be rewritten from scratch; don't use it for now.").

Then there's runit but while its runsvdir command supports a finished script,
it doesn't seem to be passing the exit code and exit status as npt-supervise
does.

So the question is: is there a way to emulate this behavior using daemontools?

-- 
Jos Backus
jos at catnook.com