develooper Front page | perl.perl5.porters | Postings from February 2004

Re: [perl #26787] read reports wrong eof under high system load

Thread Next
Michael Bell
February 19, 2004 05:50
Re: [perl #26787] read reports wrong eof under high system load
Message ID:
Sorry, for first ignoring the mail but it was detected as spam - no idea 

Kurt Starsinic via RT wrote:

>     Thanks for pointing out the lack of clarity.  However, note
> that Perl's read() is documented _not_ to be the libc read() --
> one must use Perl's sysread() to expect POSIX semantics.

I know this fact but the docs of Perl imply that a zero means EOF.

>     I favor letting read() return 0 bytes when 0 bytes are available,
> as long as the filehandle is non-blocking.  Thus, I would recommend
> changing the documentation rather than the implementation.

Ok, I'm not a Perl guru and I never looked into the source code. I only 
need a consistent state. If the documentation is changed then I can be 
sure about what I have to do (means using the function eof).

Michael Bell                   Email:
ZE Computer- und Medienservice            Tel.: +49 (0)30-2093 2482
(Computing Centre)                        Fax:  +49 (0)30-2093 2704
Humboldt-University of Berlin
Unter den Linden 6
10099 Berlin                   Email (private):

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About