New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eof() on non-blocking filehandle #7275
Comments
From perl-5.8.0@ton.iguana.beCreated by perl-5.8.0@ton.iguana.beUsing this testprogram: #! /usr/bin/perl -wl pipe(my $rd, my Running it with an argument: In an strace near the end I see: pipe([3, 4]) = 0 So the code indeed saw the EOF, but it reports it with errno set Now without argument (not closing the write side of the pipe): mm, but there is no EOF this time.... Again looking at the strace: pipe([3, 4]) = 0 So the read got EAGAIN (so perl should know it's not really EOF), Perl Info
|
From @iabynOn Fri, Apr 30, 2004 at 12:09:05PM -0000, perl-5. 8. 0 @ ton. iguana. be wrote:
The value of $! is irrelevant; it's only relevant on failed perl system
Perl's eof is implemneted by going a getc and ungetc equivalent; The real issues, are whether eof() should be clever enough to understand I guess NI-S might be able to comment better on this. Dave. -- |
The RT System itself - Status changed from 'new' to 'open' |
From perl5-porters@ton.iguana.beIn article <20040504215002.GE1884@iabyn.com>,
Well, not completely. Indeed $! only gets a guaranteed value after But yeah, that's just an expectation, not guaranteed in the perl docs,
Using stdio functions on non-blocking sockets is not what I personally Trying to formulate what I'd want to happen purely in terms of undef/Bad file descriptor in both cases (closed or non-closed non-blocking socket). The getc() docs And "Bad file descriptor" is even a very unexpected error for the |
Migrated from rt.perl.org#29277 (status was 'open')
Searchable as RT29277$
The text was updated successfully, but these errors were encountered: