February 2020
Beginner to intermediate
616 pages
15h 16m
English
The readfifo.c program for reading from the named pipe (FIFO) is as follows:
#include <fcntl.h>#include <stdio.h>#include <sys/stat.h>#include <unistd.h>#define BUFFSIZE 255int main(){ int fr; char str[BUFFSIZE]; fr = open("FIFOPipe", O_RDONLY); read(fr, str, BUFFSIZE); printf("Read from the FIFO Pipe: %s\n", str); close(fr); return 0;}
Let's go behind the scenes.
Read now
Unlock full access