On 6/17/16 9:53 AM, Vladimir Panteleev wrote:
std.process.wait() will wait for a child process to exit and return its exit code. How can this be done in Vibe.d, without blocking other fibers and without creating a new thread?
What is the OS support for waitid (http://man7.org/linux/man-pages/man2/waitpid.2.html)? Seems to have support for async waiting of multiple processes (at least it can return immediately if no child has exited). One consideration is how responsive you need to be to a process exiting -- is it ok for example to be notified 500ms after the process exits? If so, you can interleave timed waits for socket data with a check to see if any process exits. I've done this in the past for such things. I don't know how well this works for libevent though.
-Steve