Read and write in fifo
Some weeks ago I asked about read and write in fifo. But I didn't formulate my question clearly. I also asked my teacher, but he couldn't answer. Question: when we open fifo for write with NON_BLOCK flag(fifo hasn't read fd) system returns error, but when we open it only for read returns OK. Why does function open with NON_BLOCK implement such way? Why it isn't implemented in a different way: (write and read) return error or return OK?
UPD: in C, use mkfifo
Last edited by blastfox; 12-08-2015 at 12:45 PM.
|