Report-an-Apple-bug Friday! 8
This bug is kevent does not return EV_EOF when an open regular file reaches EOF. It was filed on 2006-03-17 at 02:27.
Summary:
EVFILT_READ on a regular file never returns an event with the EV_EOF flag set.
Steps to Reproduce:
- Create a
kqueue. - Open a file for reading.
- Add a
keventdescription to the queue from step 1 withEVFILT_READand the fd from step 2. - Read until the end of file.
- Call
kevent.
Expected Results:
The data member of the returned kevent structure has the EV_EOF bit set.
Actual Results:
The data member of the returned kevent structure never has the EV_EOF bit set, so if your app is expecting it, it keeps on polling forever and never closes the file.
Regression:
None known.
Notes:
I also tried calling read and kevent one more time (testing for feof behavior), but still did not get EV_EOF.
A test case is included.
(Note: GeoCities is being cranky today. The test case will be up eventually.)


0 comments:
Post a Comment
<< Home