-
September 28th, 2012, 09:42 PM
#1
[RESOLVED] select() returns "ready" even after producer is done (FIFO)
Hello,
I have a producer application that writes data into a FIFO, and I have a consumer application that reads data from FIFO utilizing select() and read() functions inside of a while(true) loop.
After producer is done (it closes and unlinks FIFO) select() on the consumer side keeps endlessly returning "ready" state, and read() returns 0 bytes. I've expected select() to return -1 once the FIFO was closed but it's not the case.
How do I catch that FIFO was closed on the producer side?
Thank you.
P.S. I should post my code but it's a large application, it would take me time to make it into a small prototype. I'd appreciate if someone knows the answer without me having to post the code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|