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
1 changed files with 6 additions and 0 deletions
|
@ -137,6 +137,11 @@ static WCHAR *find_quote(WCHAR *str)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static BOOL WINAPI console_ctrl_handler(DWORD dwCtrlType)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static HANDLE run_process(void)
|
||||
{
|
||||
WCHAR *cmdline = GetCommandLineW();
|
||||
|
@ -242,6 +247,7 @@ static HANDLE run_process(void)
|
|||
run:
|
||||
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))
|
||||
{
|
||||
WINE_ERR("Failed to create process %s: %u\n", wine_dbgstr_w(cmdline), GetLastError());
|
||||
|
|
Loading…
Reference in a new issue