3

Linux: FIFO problem

view full story
linux-howto

http://www.linuxquestions.org – Hi, I have written following program. Its not working. Can somebody guide me with this? Code:   //Reader #include <fcntrl.h> #include <stdio.h> #define MSGSIZE 10 main(){ int fd, len; char msgbuf[MSGSIZE+1]; if((fd=open("testfile",O_RDWR))<0) perror("pipe open failed"); for(;;){ len=read(fd, msgbuf, MSGSIZE+1); msgbuf[len]='\0'; printf("msg received =%s\n", msgbuf); }} //Writer #include <fcntrl.h> #include <stdio (HowTos)