summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2014-10-22 16:20:08 +1100
committerTony Cook <tony@develop-help.com>2014-10-22 16:29:29 +1100
commit8334cae656b5c7fd6ff3536633897332d0ee089a (patch)
tree37ce5ed5a9d7109888dd81a582a6a301a58f701b /doio.c
parent5df244132ec94f1e67bd70db61d4ea89bd824b00 (diff)
downloadperl-8334cae656b5c7fd6ff3536633897332d0ee089a.tar.gz
[perl #122703] ensure $! is set when chmod() and utime() fail
When called with a closed file handle, neither chmod nor utime set errno when they failed, chown() did set errno, but this wasn't tested.
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index c7aceca641..1f5f932490 100644
--- a/doio.c
+++ b/doio.c
@@ -1762,6 +1762,7 @@ Perl_apply(pTHX_ I32 type, SV **mark, SV **sp)
#endif
}
else {
+ SETERRNO(EBADF,RMS_IFI);
tot--;
}
}
@@ -1802,6 +1803,7 @@ Perl_apply(pTHX_ I32 type, SV **mark, SV **sp)
#endif
}
else {
+ SETERRNO(EBADF,RMS_IFI);
tot--;
}
}