desktop/source/app/cmdlinehelp.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
New commits: commit 7766135f1ca11f942eb5b9ccc7828d55acfbe28f Author: Mike Kaganski <mike.kagan...@collabora.com> Date: Mon Aug 21 09:51:16 2017 +0300 tdf#111908: only freopen if we try to use another console Change-Id: If513faa4aac03b4c41759445e34cc965ece0b48e Reviewed-on: https://gerrit.libreoffice.org/41378 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx index 043f7b2a2f5e..58583f71e45c 100644 --- a/desktop/source/app/cmdlinehelp.cxx +++ b/desktop/source/app/cmdlinehelp.cxx @@ -211,18 +211,18 @@ namespace desktop SetConsoleScreenBufferSize(hOut, cinfo.dwSize); } } - } - freopen("CON", "r", stdin); - freopen("CON", "w", stdout); - freopen("CON", "w", stderr); + freopen("CON", "r", stdin); + freopen("CON", "w", stdout); + freopen("CON", "w", stderr); - std::ios::sync_with_stdio(true); + std::ios::sync_with_stdio(true); - // In case we use parent's console, emit an empty string - // to avoid output on a line with command prompt - if (mConsoleMode == attached) - fprintf(stdout, "\n"); + // In case we use parent's console, emit an empty string + // to avoid output on a line with command prompt + if (mConsoleMode == attached) + fprintf(stdout, "\n"); + } } ~lcl_Console() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits