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

Fix atexit crashes because string for temp files got freed before they got used on the at exit file deletes.

[SVN r31658]
This commit is contained in:
Rene Rivera
2005-11-15 05:44:03 +00:00
parent 4f4502b55a
commit 0f9cc7a19e
2 changed files with 7 additions and 10 deletions

View File

@@ -59,11 +59,6 @@ file_info_t * file_info(char * filename)
return finfo;
}
void file_done()
{
hashdone( filecache_hash );
}
static LIST * files_to_remove = L0;
static void remove_files_atexit(void)
@@ -77,11 +72,13 @@ static void remove_files_atexit(void)
}
}
void file_done()
{
remove_files_atexit();
hashdone( filecache_hash );
}
void file_remove_atexit( const char * path )
{
if ( L0 == files_to_remove )
{
atexit(&remove_files_atexit);
}
files_to_remove = list_new( files_to_remove, newstr((char*)path) );
}

View File

@@ -509,10 +509,10 @@ int main( int argc, char **argv, char **arg_environ )
/* Widely scattered cleanup */
var_done();
file_done();
donerules();
donestamps();
donestr();
file_done();
/* close cmdout */