How it works...
Let's assume we have defined a string called str of size 255. We will invoke the mkfifo function to create a new FIFO special file. We will create the FIFO special file with the name FIFOPipe with read and write permissions for owner, group, and others.
We will open this FIFO special file in write-only mode by invoking the open function. Then, we will assign the file descriptor of the opened FIFO special file to the fw variable. You will be prompted to enter the text that is going to be written into the file. The text you enter will be assigned to the str variable, which in turn will be written into the special FIFO file when you invoke the write function. Finally, close the FIFO special file. Let's use GCC to compile the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access