kqueue, NOTE_EOF

der Mouse mouse at Rodents.Montreal.QC.CA
Thu Nov 13 02:04:05 PST 2003


>> I think the difference is in the default behavior.  When you're at
>> EOF, I know that poll() will give you a read-availability event, so
>> you'll read the EOF.  Will kqueue?
> AFAIK yes for sockets, not for file descriptor (i.e. descriptor open
> to a file on filesystem).  Would poll() give you read-availability
> event when on end of file on filesystem.

IMO it should, since a read() wouldn't block.

When I tried it (admittedly against a rather old kernel) it does.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse at rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


More information about the freebsd-hackers mailing list