2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-13 12:22:17 +00:00

Workaround for failure to create command batch files. Thanks to Bronek Kozicki.

[SVN r31718]
This commit is contained in:
Rene Rivera
2005-11-21 05:36:29 +00:00
parent fe83cf879b
commit 71f97e742d

View File

@@ -577,11 +577,20 @@ execcmd(
}
else
{
FILE *f;
FILE *f = 0;
int tries = 0;
raw_cmd = 0;
/* Write command to bat file. */
f = fopen( cmdtab[ slot ].tempfile, "w" );
/* Write command to bat file. For some reason this open can
fails intermitently. But doing some retries works. Most likely
this is due to a previously existing file of the same name that
happens to be opened by an active virus scanner. Pointed out,
and fix by Bronek Kozicki. */
for (; !f && tries < 4; ++tries)
{
f = fopen( cmdtab[ slot ].tempfile, "w" );
if ( !f && tries < 4 ) Sleep( 250 );
}
if (!f)
{
printf( "failed to write command file!\n" );