/**/ Dextutor - Page 9 of 14 - Solutions made simple

Program for IPC using named pipes (mkfifo())

Program for IPC using named pipes (mkfifo()) The third method for IPC is using mkfifo() function. mkfifo() creates a named pipe which can be used exactly like a file. So, if you know how to read/write in a file this is a convenient method for IPC Syntax: #include<sys/types.h>#include<sys/stat.h>int mkfifo(const char *pathname, mode_t mode); mkfifo() makes …

Program for IPC using named pipes (mkfifo()) Read More »

Program for IPC using pipe() function

The second method for IPC is using the pipe() function. Before writing a program for IPC using pipe() function let us first understand its working. Syntax: #include<unistd.h>int pipe(int pipefd[2]); pipe() function creates a unidirectional pipe for IPC. On success it return two file descriptors pipefd[0] and pipefd[1]. pipefd[0] is the reading end of the pipe. …

Program for IPC using pipe() function Read More »