bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: select() for read a regular file


From: Paul Jarc
Subject: Re: select() for read a regular file
Date: Thu, 13 Apr 2006 12:15:15 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

"tovis" <address@hidden> wrote:
> Does the select() working for reading a regular file?
> At last I have built a small example code and I get the result that file
> is always could be read, event if nothing to read (file siez is zero).

That's normal.  You'll also see pipes and sockets as readable when
they're at EOF.  select() doesn't quite tell you when there is data to
be read - it tells you when read() would return quickly without
blocking.  That will happen if there is data to be read, or if the
descriptor is at EOF.


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]