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

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

Thread Next
From:
Michael Bell
Date:
February 19, 2004 05:50
Subject:
Re: [perl #26787] read reports wrong eof under high system load
Message ID:
4034BEAA.4040900@cms.hu-berlin.de
Sorry, for first ignoring the mail but it was detected as spam - no idea 
why.

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
-- 
-------------------------------------------------------------------
Michael Bell                   Email: michael.bell@cms.hu-berlin.de
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): michael.bell@web.de
Germany                                       http://www.openca.org


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About