summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorPeter Dintelmann <Peter.Dintelmann@Dresdner-Bank.com>2005-09-27 17:18:00 +0200
committerSteve Peters <steve@fisharerojo.org>2005-09-27 15:05:18 +0000
commitb42969c054c571b3b721d68818184e59ca761058 (patch)
tree7a2158184582518063f729b7f74fdd42a47de68b /doio.c
parent013b78e8b7544d87392bc0a7f2840e8f7280e786 (diff)
downloadperl-b42969c054c571b3b721d68818184e59ca761058.tar.gz
AW: [perl #36291] incorrect $! from open ">&nr" with too many open files
From: "Dintelmann, Peter" <Peter.Dintelmann@Dresdner-Bank.com> Date: Tue, 27 Sep 2005 15:18:00 +0200 p4raw-id: //depot/perl@25621
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/doio.c b/doio.c
index 4f30a59e96..26554cffd4 100644
--- a/doio.c
+++ b/doio.c
@@ -408,7 +408,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
else
was_fdopen = TRUE;
if (!(fp = PerlIO_openn(aTHX_ type,mode,fd,0,0,NULL,num_svs,svp))) {
- if (dodup)
+ if (dodup && fd >= 0)
PerlLIO_close(fd);
}
}