Re: select/poll on files/dirs ?

Rene Janssen (rjanssen@ns.oke.nl)
Thu, 24 Dec 1998 09:50:04 +0100


At 05:11 PM 12/23/98 -0500, Brandon S. Allbery KF8NH wrote:
>In message <Pine.LNX.4.02.9812231504440.374-100000@einstein.london.sco.com>,
>Ti
>gran Aivazian writes:
>+-----
>| But I thought select(2) already works on regular files in a predictable
>| manner, i.e. the descriptor sets are "always ready", so it is kind of
>| uninteresting. More interesting is the Asynchronous I/O issue. I remember
>+--->8
>
>The actual proposal was poll() (not select()) flags to block waiting on
>specific events (changes to a directory or a file). This allows select() to
>behave as it currently does but allows programs which know about poll() to
>more efficiently wait on file/directory change events (a file manager would
>wait on a directory and update its display, and tail could wait on file
>extend instead of doing a non-blocking read once a second).
>

I submitted a patch a while ago that implements (queued) SIGIO behaviour
for regular files & dirs. Works fine but could be improved I guess.. I'll
make a patch against .132 if anyone is interested.
I dont think there was actual agreement on this subject. Alan Cox wanted
todo select() on /proc if I recall correctly. I worked a bit on this but
didnt finish that.
I think all three methods (select(),poll() and queued SIGIO with
SI_SIGINFO) could be implemented, because the semantics are nonstandard
anyway.

René Janssen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/