summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2001-08-23 00:29:06 +0100
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-08-25 14:52:33 +0000
commite940ddbba91304b2a80fdaa904f5b12c22b13e0a (patch)
tree85c91ca3396fe501cdf9e4b4a81c05766f2a48ff /perlio.c
parentc5cf9ec268be725ef943af3a8c93c6ce5c5492de (diff)
downloadperl-e940ddbba91304b2a80fdaa904f5b12c22b13e0a.tar.gz
(was Re: PerlIO regerssion tests?)
Message-Id: <20010822232906.Z82818@plum.flirble.org> p4raw-id: //depot/perl@11747
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index e1730c8ac3..90867dec9a 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1968,7 +1968,10 @@ PerlIOUnix_pushed(PerlIO *f, const char *mode, SV *arg)
{
PerlIOUnix *s = PerlIOSelf(f,PerlIOUnix);
s->fd = PerlIO_fileno(PerlIONext(f));
- s->oflags = PerlIOUnix_oflags(mode);
+ /* XXX could (or should) we retrieve the oflags from the open file handle
+ rather than believing the "mode" we are passed in?
+ XXX Should the value on NULL mode be 0 or -1? */
+ s->oflags = mode ? PerlIOUnix_oflags(mode) : -1;
}
PerlIOBase(f)->flags |= PERLIO_F_OPEN;
return code;