fifo is just similar to pipe as its second name suggest which is named pipe… In fifo and pipe first difference is pipe cannot be seen in directory but named pipe(fifo ) can be accessed or seen inside the pipe and pipe cannot communicate between two seperate processes while at same time fifo can be used between two non relating processes which is having originated from same ancestors in the past.
for creating fifo you need
mkfifo(“fifo name ” , mode in which you want to make pipe(for ex 777));
fifo can be accessed in only one mode at a time that can be in read mode(O_RDONLY) or write mode(O_WRONLY) to get there file descriptor you just need to type a command
readfd=open(“fifo name “, O_RDONLY)
writefd=open(“fifo name “, O_WRONLY)
so open command will return the file descriptor as demanded in the command and you can use it.
if you open the read file descriptor in one process so you need to open file descriptor on other side in write mode otherwise it will be on blocking mode…..