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
parent 95bb4d5e15
commit 3f97e4a635

View File

@ -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);
}