stdio does NOT set errno==EBADF on invalidated fileno
Nick Ing-Simmons [Tue, 21 Jan 2003 20:53:00 +0000 (20:53 +0000)]
p4raw-id: //depot/perlio@18540

perlio.c

index 996b893..ff68dfb 100644 (file)
--- 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;
        }