On Monday 16 February 2015 17:04:34 Rob Stewart wrote:
On February 16, 2015 8:21:01 AM EST, Andrey Semashev
wrote: On Monday 16 February 2015 06:47:00 Rob Stewart wrote:
The same is possible using select if one opens a pipe or socket to the other process, since closing the other process will close its end of the IPC.
I think sigwait or signalfd are better suited for this.
Those only apply to monitoring signals. The desire here was to wait on multiple things including sync primitives.
I was suggesting a way to monitor a process, as a better alternative to pipes.
However, I feel that in such cases specialized solutions or Boost.ASIO would play better.
Those would only apply to files, sockets, etc.
Boost.ASIO has support for any fd-based entities, and also can be used to invoke functions in the working threads. This covers pretty much everything you may need in order to synchronize with multiple event sources.