Module: wine Branch: master Commit: ca30fa5cb42f3f7d69590cbf4f74dcb58987c730 URL: https://source.winehq.org/git/wine.git/?a=commit;h=ca30fa5cb42f3f7d69590cbf4...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Aug 17 15:08:11 2020 +0200
wineconsole: Make sure that console process is not attached to another console.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/wineconsole/wineconsole.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index 1104963f0f..76e1d17dd6 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -853,6 +853,9 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, INT nCmdSh int ret = 1; struct wc_init wci;
+ /* make sure we're not connected to inherited console */ + FreeConsole(); + if ((ret = WINECON_ParseOptions(lpCmdLine, &wci)) != 0) { printf_res(ret & 0xffff);