mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
cdf47037d7
commit
aebc8a52c7
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user