I'm trying to create a named pipe in C, but have not had any success.
Here is my code:
#define FIFO_NAME "/tmp/myfifo"
int main(){
int fd;
fd = mkfifo(FIFO_NAME, 0666);//, 0);
if(fd<0){
fprintf(stderr,"Error creating fifo\n");
exit(0);
}
On running the above code every time output comes out:
Error creating fifo
Please help.