I want to understand the lifetime of a pipe? http://linux.die.net/man/2/pipe
- Does the data in the pipe stay alive if either the sender or receiver dies/exits?
- Can the pipe be created if the receiver is not present? (i.e. has not been forked off yet)?
I need to send data from sender to the receiver. However, the receiver may not have been forked off yet, and may be active about (1~2 seconds after the sender). They share the parent process, but the receiver may be forked off at some point much after the sender or vice versa.
Also it is possible that the sender can finish processing and exit at any time. I'm trying to see if using pipe's instead of a shared memory queue would work for me.