Bug 787313 - Add back code that was erroneously reverted. r=ochameau

This commit is contained in:
Ryan VanderMeulen 2012-09-26 18:56:49 -04:00
Родитель a8a6c5265f
Коммит f88ee14247
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -405,9 +405,11 @@ nsNativeAppSupportWin::CheckConsole() {
if (_fileno(stdout) == -1 ||
_get_osfhandle(fileno(stdout)) == -1)
freopen("CONOUT$", "w", stdout);
// Merge stderr into CONOUT$ since there isn't any `CONERR$`.
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms683231%28v=vs.85%29.aspx
if (_fileno(stderr) == -1 ||
_get_osfhandle(fileno(stderr)) == -1)
freopen("CONERR$", "w", stderr);
freopen("CONOUT$", "w", stderr);
if (_fileno(stdin) == -1 || _get_osfhandle(fileno(stdin)) == -1)
freopen("CONIN$", "r", stdin);
}