You can create a named PIPI using the mknode function, but also the user to create the dev file, so you need to specify which file you want to create with user rights, and the dev type is
Syntax:
mknode (const char* fileName, mode_t mode | S_IFIFO, (dev_t) 0)
For instance:
mknode("pipe1",0777 | S_IFIFO, (dev_t) 0)
You also use the mkfifo API to create the file that it defines PIPE, since you do not need to specify what type of file you want to create:
mkfifo()
source
share