зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
339b9867ca
Коммит
4170258b2e
|
@ -465,7 +465,9 @@ void InitPoisonIOInterposer() {
|
|||
|
||||
// Stdout and Stderr are OK.
|
||||
MozillaRegisterDebugFD(1);
|
||||
MozillaRegisterDebugFD(2);
|
||||
if (::GetStdHandle(STD_OUTPUT_HANDLE) != ::GetStdHandle(STD_ERROR_HANDLE)) {
|
||||
MozillaRegisterDebugFD(2);
|
||||
}
|
||||
|
||||
#ifdef MOZ_REPLACE_MALLOC
|
||||
// The contract with InitDebugFd is that the given registry can be used
|
||||
|
|
Загрузка…
Ссылка в новой задаче