in reply to Forked pipe deadlock
For more on this issue, see the thread Practice of using fork() in comp.unix.programmer.
It also includes a good discussion about what library routines might not be safe to call after using fork.