diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2012-01-03 14:22:45 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2012-01-03 14:22:45 +0000 |
commit | 421de62232cb19339199b20f3f092e90b5ad8a22 (patch) | |
tree | 028fd34eaa592f37de7eb35afb7c2a64ebffcb1f | |
parent | c567812fa6d240e9ef5661d43326c26c7b85343e (diff) | |
download | openssl-new-421de62232cb19339199b20f3f092e90b5ad8a22.tar.gz |
unlink target and retry to avoid intermittent Win32 failures
-rw-r--r-- | util/fipslink.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/fipslink.pl b/util/fipslink.pl index 8b6fbad7d8..262d691d1b 100644 --- a/util/fipslink.pl +++ b/util/fipslink.pl @@ -57,6 +57,15 @@ print "$fips_cc -DHMAC_SHA1_SIG=\\\"$fips_hash\\\" $fips_cc_args $fips_libdir/fi system "$fips_cc -DHMAC_SHA1_SIG=\\\"$fips_hash\\\" $fips_cc_args $fips_libdir/fips_premain.c"; die "Second stage Compile failure" if $? != 0; +my $delcnt = 0; +# On windows the previous file doesn't always close straight away +# so retry an unlink operation a few times if it fails. +while (!unlink($target)) + { + sleep 2; + die "Can't delete $target" if ($delcnt++ > 10); + } + print "$fips_link @ARGV\n"; system "$fips_link @ARGV"; |