-3

How do 2 processes communicate by using single bidirectional pipe, such that both the ends of the pipe could read and write.

  • Yet another valid question being closed for the wrong reason? This question doesn't ask for learning material at all. It simply asks for help! – garethTheRed Apr 14 '16 at 17:07
1

You don't. Pipes are unidirectional: you write at the write end, and read from the read end.

If you want bidirectional communication, use a socket, or two pipes.

You can use a pipe for bidirectional communication if both processes keep both ends of the pipe open. You need to define a protocol for whose turn it is to talk. This is highly impractical.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.