From: Nick Ing-Simmons Date: Sun, 5 Nov 2000 11:09:34 +0000 (+0000) Subject: Fix read from STDERR on raw unix layer for Solaris where fd 2 is X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8f24bd7931e1129a30ea0a951e81eecafa42f53b;p=p5sagit%2Fp5-mst-13.2.git Fix read from STDERR on raw unix layer for Solaris where fd 2 is open RDWR so does not fail. (pragma/warnings 303 again...) p4raw-id: //depot/perlio@7555 --- diff --git a/perlio.c b/perlio.c index 9774c3c..c72818b 100644 --- a/perlio.c +++ b/perlio.c @@ -909,6 +909,8 @@ SSize_t PerlIOUnix_read(PerlIO *f, void *vbuf, Size_t count) { int fd = PerlIOSelf(f,PerlIOUnix)->fd; + if (!(PerlIOBase(f)->flags & PERLIO_F_CANREAD)) + return 0; while (1) { SSize_t len = read(fd,vbuf,count);