summaryrefslogtreecommitdiff
path: root/ext/Errno
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-03-31 21:15:53 +0100
committerNicholas Clark <nick@ccl4.org>2009-03-31 21:15:53 +0100
commitf5800e99d72d77bcc6c5baa0f11e9dbedfb30ce4 (patch)
tree3377fb75264850eb897456b1aa1ed103b8268775 /ext/Errno
parent87da6a1ba6219911bbce32fdb540060dbb481f1c (diff)
downloadperl-f5800e99d72d77bcc6c5baa0f11e9dbedfb30ce4.tar.gz
Close the file before renaming it. Problem spotted and fix supplied by corion.
Diffstat (limited to 'ext/Errno')
-rw-r--r--ext/Errno/Errno_pm.PL2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 424f0f3b4c..dc8eaba8b0 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -40,6 +40,8 @@ else {
}
write_errno_pm();
unlink "errno.c" if -f "errno.c";
+close OUT or die "Error closing Errno.tmp: $!";
+select STDOUT;
rename "Errno.tmp", "Errno.pm" or die "Cannot rename Errno.tmp to Errno.pm: $!";
sub process_file {