develooper Front page | perl.perl5.porters | Postings from October 2012

[perl #24067] IO::Handle::error doesn't report errors

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
October 12, 2012 17:41
Subject:
[perl #24067] IO::Handle::error doesn't report errors
Message ID:
rt-3.6.HEAD-23477-1350088883-1819.24067-15-0@perl.org
On Sat Oct 18 04:58:34 2003, davem wrote:
> 
> In IO.xs, XS_IO__Handle_error is set up to report errors on the input
> stream only, which is why it's seeing the wrong result.
> That is to say, it effectively calls PerlIO_error(IoIFP(io)) rather
> than
> IoOFP(io).  Anyone have a clue how to handle this, because I dont!
> 

This is the source code you're referring to -- correct?

dist/IO/IO.xs
#####

    345 int
    346 ferror(handle)
    347     InputStream handle
    348     CODE:
    349     if (handle)
    350 #ifdef PerlIO
    351         RETVAL = PerlIO_error(handle);
    352 #else
    353         RETVAL = ferror(handle);
    354 #endif
    355     else {
    356         RETVAL = -1;
    357         errno = EINVAL;
    358     }
    359     OUTPUT:
    360     RETVAL
#####

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=24067

Thread Previous | 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