зеркало из https://github.com/mozilla/gecko-dev.git
Bug 535564 yet another attempt - Don't inherit the leak log handle from parent to child processes: Java spawns a process which holds this handle alive beyond our shutdown, causing our test harnesses to be unable to delete it, r?jgriffin
This commit is contained in:
Родитель
b3c5c7f364
Коммит
960011b6e2
|
@ -620,6 +620,12 @@ static PRBool LogThisObj(PRInt32 aSerialNumber)
|
|||
return nsnull != PL_HashTableLookup(gObjectsToLog, (const void*)(aSerialNumber));
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
#define FOPEN_NO_INHERIT "N"
|
||||
#else
|
||||
#define FOPEN_NO_INHERIT
|
||||
#endif
|
||||
|
||||
static PRBool InitLog(const char* envVar, const char* msg, FILE* *result)
|
||||
{
|
||||
const char* value = getenv(envVar);
|
||||
|
@ -653,7 +659,7 @@ static PRBool InitLog(const char* envVar, const char* msg, FILE* *result)
|
|||
fname.AppendLiteral(".log");
|
||||
}
|
||||
#endif
|
||||
stream = ::fopen(fname.get(), "w");
|
||||
stream = ::fopen(fname.get(), "w" FOPEN_NO_INHERIT);
|
||||
if (stream != NULL) {
|
||||
*result = stream;
|
||||
fprintf(stdout, "### %s defined -- logging %s to %s\n",
|
||||
|
|
Загрузка…
Ссылка в новой задаче