
In the above program, I typed linux. Basically, it should connect the client and server to separate terminals. But when I run them in the correct order, i.e.
- Compile server -> start server
- Compile client -> start client
Terminals just do nothing. It does not even print the "Trying to connect" first printf statement. What is the mistake here?
EDIT
I checked for mkfifo return value as @parapura rajkumar said. But still remains the same. Here is my modified server code.
if(mkfifo("fifo1",0666)<0) { printf("Error"); } if(mkfifo("fifo2",0666)<0) { printf("Error"); } fflush(stdout);
source share