From: Nicholas Clark Date: Tue, 31 Mar 2009 20:15:53 +0000 (+0100) Subject: Close the file before renaming it. Problem spotted and fix supplied by corion. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f5800e99d72d77bcc6c5baa0f11e9dbedfb30ce4;p=p5sagit%2Fp5-mst-13.2.git Close the file before renaming it. Problem spotted and fix supplied by corion. --- diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL index 424f0f3..dc8eaba 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 {