summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorPeter Dintelmann <Peter.Dintelmann@Dresdner-Bank.com>2006-02-07 17:33:54 -0800
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-02-08 13:15:51 +0000
commit4dc171f099f09ddce664c46adaa55908b398396f (patch)
tree7afca85c1566bfb3f4d59a501b26af06d3a54aab /pp_sys.c
parent294a48e93682c45d53fd3e8adb7bbdd7068cbb1d (diff)
downloadperl-4dc171f099f09ddce664c46adaa55908b398396f.tar.gz
[perl #38464] chdir() on closed handles
From: Peter Dintelmann (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.0.11-38464-129771.3.46114092925276@perl.org> Plus a regression test. p4raw-id: //depot/perl@27130
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 8e8004ad43..5437c627a3 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3345,10 +3345,16 @@ PP(pp_chdir)
#endif
}
else {
+ if (ckWARN2(WARN_UNOPENED,WARN_CLOSED))
+ report_evil_fh(gv, io, PL_op->op_type);
+ SETERRNO(EBADF, RMS_IFI);
PUSHi(0);
}
}
else {
+ if (ckWARN2(WARN_UNOPENED,WARN_CLOSED))
+ report_evil_fh(gv, io, PL_op->op_type);
+ SETERRNO(EBADF,RMS_IFI);
PUSHi(0);
}
#else