EmbLogic's Blog

Pipes

Behaviour of pipes
*pipes provide unidirectional data channel (half duplex ),provides a read and write file descriptors
*the communication channel provided by a pipe transfers data in the form of byte stream
*if a process attempts to read from empty pipe provided both the file descriptors are open we will observe a block on read
*if a process atempts to write on a full pipe , with both descriptors open then we will observe a block on write
*if writing side has been closed and there exists some data in the pipe then reader could read till EOF
*if all the read descriptors are closed, then a attempt to write will cause a SIGPIPE signal to the calling process
*pipes can be made non blocking types using O_NONBLOCK in the flag

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>