summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2015-05-26 16:03:31 +1000
committerTony Cook <tony@develop-help.com>2015-06-03 15:12:55 +1000
commit0c9375a5ca42fadd4d631bf07a8dd4d8f7814d34 (patch)
treee613da04759a46e7988374e7dd6252b99c6c00fc /doio.c
parentef5cf9f5e65d5aeb89a77dcc06c7367c6926f014 (diff)
downloadperl-0c9375a5ca42fadd4d631bf07a8dd4d8f7814d34.tar.gz
[perl #125115] don't create file GLOB(...) when dupping a closed handle
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/doio.c b/doio.c
index 5f29a6b1fc..2630252ae1 100644
--- a/doio.c
+++ b/doio.c
@@ -438,8 +438,11 @@ Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len,
else if (IoTYPE(thatio) == IoTYPE_SOCKET)
IoTYPE(io) = IoTYPE_SOCKET;
}
- else
- wanted_fd = -1;
+ else {
+ SETERRNO(EBADF, RMS_IFI);
+ fp = NULL;
+ goto say_false;
+ }
}
if (!num_svs)
type = NULL;