diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-03-31 21:15:53 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-03-31 21:15:53 +0100 |
commit | f5800e99d72d77bcc6c5baa0f11e9dbedfb30ce4 (patch) | |
tree | 3377fb75264850eb897456b1aa1ed103b8268775 /ext | |
parent | 87da6a1ba6219911bbce32fdb540060dbb481f1c (diff) | |
download | perl-f5800e99d72d77bcc6c5baa0f11e9dbedfb30ce4.tar.gz |
Close the file before renaming it. Problem spotted and fix supplied by corion.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Errno/Errno_pm.PL | 2 |
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 { |