summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doio.c1
-rw-r--r--t/io/fs.t1
2 files changed, 2 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index baca499d10..76f2e0e84b 100644
--- a/doio.c
+++ b/doio.c
@@ -2766,6 +2766,7 @@ nothing in the core.
#endif
}
else {
+ SETERRNO(EBADF,RMS_IFI);
tot--;
}
}
diff --git a/t/io/fs.t b/t/io/fs.t
index a36fbe83ae..0628df8afa 100644
--- a/t/io/fs.t
+++ b/t/io/fs.t
@@ -265,6 +265,7 @@ SKIP: {
check_utime_result($ut, $accurate_timestamps, $delta);
# [perl #122703]
close $fh;
+ $! = 0;
ok(!utime($ut,$ut + $delta, $fh),
"utime fails on a closed file handle");
isnt($!+0, 0, "and errno was set");