I am trying to use FIFO for interprocessing. But when trying to create a FIFO and then open it, my program hangs (cannot exit).
if (mkfifo("./fifo.txt", S_IRUSR | S_IWUSE) < 0) { fprint("Can not create fifo"); return 1; } if ((readfd = open("./fifo.txt", O_RDONLY)) < 0) { return 1; } What am I doing wrong here?
Thank you very much.