On 07/20/10 14:11, Eric Blake wrote: > Hmm, maybe we should do more validation in the parent - not just read > from the fifo, but validate that we actually read a token. That way, we > can ignore EOF (on the grounds that it may be a temporary condition, and > that more children remain to be run) and only advance when the token we > read back is non-empty.
That would be better than now, but taking a step back, why are we using a named fifo at all? Why not simply use a pipe? Then we wouldn't have to worry about all this after-you-Alphonse business. Children could write to the pipe when they're done. The parent could read from the pipe to find out when a child died.