select() hangs on EOF

Matthew Dillon dillon at apollo.backplane.com
Sun Aug 22 15:34:45 PDT 2010


:Hi,
:
:lang/guile no longer works since the recent kevent changes.
:The problem is that select() for read now hangs when a fd on a local
:file has reached EOF.
:
:The following test program shows the issue (touch foo.txt before
:running):

    Ok, since kqueue expects a read event only when not at the EOF
    and select/poll (historically) always return an immediate event
    regardless of the file seek position, for regular files, I have
    adjusted the kernel and filesystem code to make the distinction.

						-Matt





More information about the Bugs mailing list