mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-28 06:28:20 +03:00
steam_helper: Do not let the default console ctrl handler kill us.
I'm not sure if we should intercept all ctrl types, but letting Ctrl-C kill us is getting in the way when we run winedbg as a child.
This commit is contained in:
parent
bf706d0402
commit
a0b7e2daba
@ -137,6 +137,11 @@ static WCHAR *find_quote(WCHAR *str)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL WINAPI console_ctrl_handler(DWORD dwCtrlType)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static HANDLE run_process(void)
|
static HANDLE run_process(void)
|
||||||
{
|
{
|
||||||
WCHAR *cmdline = GetCommandLineW();
|
WCHAR *cmdline = GetCommandLineW();
|
||||||
@ -242,6 +247,7 @@ static HANDLE run_process(void)
|
|||||||
run:
|
run:
|
||||||
WINE_TRACE("Running command %s\n", wine_dbgstr_w(cmdline));
|
WINE_TRACE("Running command %s\n", wine_dbgstr_w(cmdline));
|
||||||
|
|
||||||
|
SetConsoleCtrlHandler( console_ctrl_handler, TRUE );
|
||||||
if (!CreateProcessW(NULL, cmdline, NULL, NULL, FALSE, flags, NULL, NULL, &si, &pi))
|
if (!CreateProcessW(NULL, cmdline, NULL, NULL, FALSE, flags, NULL, NULL, &si, &pi))
|
||||||
{
|
{
|
||||||
WINE_ERR("Failed to create process %s: %u\n", wine_dbgstr_w(cmdline), GetLastError());
|
WINE_ERR("Failed to create process %s: %u\n", wine_dbgstr_w(cmdline), GetLastError());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user