pipe-tools
Software
www.skarnet.org

The npt-wait program

npt-wait waits until it has been either notified by npt-notify or interrupted by a signal. It's a simple interface to the nptrigger_wait library call.

Interface

     npt-wait fifodir
A fifodir is a directory, in which npt-wait will create a unique fifo. fifodir will be created if it does not exist.

npt-wait exits 111 if it is interrupted. If it is notified with an event e, it prints e on its stdout, without a trailing newline, and exits 0.

You should use npt-wait with maximumtime to ensure that it does not block forever.