diff options
author | Peter Dintelmann <Peter.Dintelmann@Dresdner-Bank.com> | 2006-02-07 17:33:54 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-02-08 13:15:51 +0000 |
commit | 4dc171f099f09ddce664c46adaa55908b398396f (patch) | |
tree | 7afca85c1566bfb3f4d59a501b26af06d3a54aab /pp_sys.c | |
parent | 294a48e93682c45d53fd3e8adb7bbdd7068cbb1d (diff) | |
download | perl-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |