pipe-tools
Software
www.skarnet.org
The npt-svwaitexit program
npt-svwaitexit waits for the death of a set of npt-supervise
processes. It works only with npt-supervise.
Interface
npt-svwaitexit timeout servicedir [ servicedir ... ]
- npt-svwaitexit blocks until there is no npt-supervise
process running on any of the servicedirs. Then it exits 0.
- If a hard error occurs, npt-svwaitexit exits 111.
- If timeout seconds elapse and npt-svwaitexit is still
waiting, it exits 99. A 0 value for timeout means infinite.
- If you are using
svscan, you should
make sure that it is dead or that the links in /service are
removed before calling npt-svwaitexit; else the npt-supervises
will restart, whatever npt-svwaitexit may say.
Related work
If you are interested in guarantees on process state, you should also
have a look at:
- runit,
by Gerrit Pape.
- svclean, by
Paul Jarc.
It looks like everyone of us has his own implementation of the same
concept. Choose the one that suits you best. :-)
- and of course the root of it all:
daemontools,
by Dan J. Bernstein.