I read / write to the pipe(pipe_fds) created by pipe(pipe_fds) . So basically with the following code, I read from this channel:
fp = fdopen(pipe_fds[0], "r");
And when I ever get something, I print it:
while (fgets(buf, 200, fp)) { printf("%s", buf); }
I want when for some time nothing appears on the pipe until read , I want to know about it and do:
printf("dummy");
Is it possible to do select () ? Any pointers on how to do this will be great.
source share