projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e480d5
)
Retry rename operation with a slight delay to workaround problems on
author
Dr. Stephen Henson
<steve@openssl.org>
Sat, 10 Dec 2011 18:06:55 +0000
(18:06 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Sat, 10 Dec 2011 18:06:55 +0000
(18:06 +0000)
some versions of Windows.
util/fipsas.pl
patch
|
blob
|
history
diff --git
a/util/fipsas.pl
b/util/fipsas.pl
index 1694c59a411fc52582574f262c2e902c3606d241..2734a20181535af8e8fb485243dbbf09ced4ad34 100644
(file)
--- a/
util/fipsas.pl
+++ b/
util/fipsas.pl
@@
-56,7
+56,14
@@
my ($from, $to);
unlink $tmptarg;
#rename target temporarily
-rename($target, $tmptarg) || die "Can't rename $target";
+my $rencnt = 0;
+# On windows the previous file doesn't always close straight away
+# so retry the rename operation a few times if it fails.
+while (!rename($target, $tmptarg))
+ {
+ sleep 2;
+ die "Can't rename $target" if ($rencnt++ > 10);
+ }
#edit target
open(IN,$tmptarg) || die "Can't open temporary file";