kernel - Fix read event on file for select/poll API
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 22 Aug 2010 22:30:08 +0000 (15:30 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 22 Aug 2010 22:30:08 +0000 (15:30 -0700)
commit57b24f4ee66aaaa59b54e9577b93253cf435672f
treed19afef2ac438d130b8383ccef21e6f08d0f06d5
parentdec22111fdbc11d3f7957d19c741946e65f48e0a
kernel - Fix read event on file for select/poll API

* select/poll have always returned an immediate read event on regular
  files, but kqueue is expected to only return a EVFILT_READ event
  when not sitting at the file EOF.

* The kernel adds a NOTE_OLDAPI flag which filter functions can use to
  discern between select/poll and kqueue related knotes.

* Adjust filesystem filter function to always return an immediate
  event for reads via select/poll.

* Fixes guile, which for some reason beyond our ken select()'s for a
  read event on a file.

Reported-by: Johannes Hofmann <johannes.hofmann@gmx.de>
sys/kern/sys_generic.c
sys/sys/event.h
sys/vfs/gnu/ext2fs/ext2_vnops.c
sys/vfs/hammer/hammer_vnops.c
sys/vfs/ufs/ufs_vnops.c