summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2003-01-21 20:53:00 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2003-01-21 20:53:00 +0000
commite85294730ea95da49196ebe8f63ce0db11ebd231 (patch)
tree8f40859a6385d4c7b40e8ce421876e6df5076f04 /perlio.c
parent0d7a53989a672378609205d638df0119542bcf7e (diff)
downloadperl-e85294730ea95da49196ebe8f63ce0db11ebd231.tar.gz
stdio does NOT set errno==EBADF on invalidated fileno
p4raw-id: //depot/perlio@18540
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/perlio.c b/perlio.c
index 996b893e22..ff68dfbb11 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;
}