From: Nick Ing-Simmons Date: Tue, 21 Jan 2003 20:53:00 +0000 (+0000) Subject: stdio does NOT set errno==EBADF on invalidated fileno X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e85294730ea95da49196ebe8f63ce0db11ebd231;p=p5sagit%2Fp5-mst-13.2.git stdio does NOT set errno==EBADF on invalidated fileno p4raw-id: //depot/perlio@18540 --- diff --git a/perlio.c b/perlio.c index 996b893..ff68dfb 100644 --- a/perlio.c +++ b/perlio.c @@ -2814,8 +2814,10 @@ PerlIOStdio_close(pTHX_ PerlIO *f) } } result = PerlSIO_fclose(stdio); - /* We treat EBADF from stdio as success if we invalidated */ - if (invalidate && result != 0 && errno == EBADF) { + /* We treat error from stdio as success if we invalidated + errno may NOT be expected EBADF + */ + if (invalidate && result != 0) { errno = saveerr; result = 0; }