IMHO that is a bit to much overhead. I guess there is no real need to spawn a separate process for logging. Instead, can we simply create a socketpair, use one end of the pipe for stdout/stderr, and read the other end inside the main loop (async io)?