mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1163452 - Only register stderr if it differs from stdout. r=glandium
Under certain Windows shells, the handle for stderr may be the same as the handle for stdout. Avoid crashing in this case. Differential Revision: https://phabricator.services.mozilla.com/D150517
This commit is contained in:
parent
339b9867ca
commit
4170258b2e
@ -465,7 +465,9 @@ void InitPoisonIOInterposer() {
|
|||||||
|
|
||||||
// Stdout and Stderr are OK.
|
// Stdout and Stderr are OK.
|
||||||
MozillaRegisterDebugFD(1);
|
MozillaRegisterDebugFD(1);
|
||||||
MozillaRegisterDebugFD(2);
|
if (::GetStdHandle(STD_OUTPUT_HANDLE) != ::GetStdHandle(STD_ERROR_HANDLE)) {
|
||||||
|
MozillaRegisterDebugFD(2);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef MOZ_REPLACE_MALLOC
|
#ifdef MOZ_REPLACE_MALLOC
|
||||||
// The contract with InitDebugFd is that the given registry can be used
|
// The contract with InitDebugFd is that the given registry can be used
|
||||||
|
Loading…
Reference in New Issue
Block a user