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 |
I think it is in C, but probably not. Can you please post a sample code to show exactly what do you mean?
|
Never done it in C, but on CLI. Did you use mkfifo (or the equivalent?)
There are some info pages on C programming, which some distro packages redistribute. You can run info printf for instance. you're told what header to include, etc. |
All times are GMT -5. The time now is 01:56 PM. |