summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorRobert Spier <rspier@pobox.com>2001-06-27 19:13:16 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-28 03:49:07 +0000
commit01a8ea99aa0cc0263eb74d7ab3d340994973e3f6 (patch)
tree195ac1ae22ee7ce259ca56206e6a3ab81b26c45f /doio.c
parenta333faafe1ea79cc2ee6a8e7cd6170ab2dcba713 (diff)
downloadperl-01a8ea99aa0cc0263eb74d7ab3d340994973e3f6.tar.gz
[ID 20010625.009] open(FILE,"+foo") [PATCH]
Message-ID: <15162.41164.618712.841415@rls.cx> p4raw-id: //depot/perl@10999
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index 84d2aaac25..dfd87101d5 100644
--- a/doio.c
+++ b/doio.c
@@ -233,6 +233,7 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
}
IoTYPE(io) = *type;
if ((*type == IoTYPE_RDWR) && /* scary */
+ (*(type+1) == IoTYPE_RDONLY || *(type+1) == IoTYPE_WRONLY) &&
((!num_svs || (tend > type+1 && tend[-1] != IoTYPE_PIPE)))) {
mode[1] = *type++;
writing = 1;