Back to Terminal

Console Control Events

doc/ConsoleCtrlEvent.md

1.25.1171.01.4 KB
Original Source

Console Control Events

Generation

conhost requests that user32 injects a thread into the attached console application. See ntuser's exitwin.c for CreateCtrlThread.

Timeouts

Sourced from ntuser's exitwin.c, user.h

EventCircumstancesTimeout
CTRL_CLOSE_EVENTanysystem parameter SPI_GETHUNGAPPTIMEOUT, 5000ms
CTRL_LOGOFF_EVENTCONSOLE_QUICK_RESOLVE_FLAG[1]registry key CriticalAppShutdownTimeout or 500ms
CTRL_LOGOFF_EVENTnone of the abovesystem parameter SPI_GETWAITTOKILLTIMEOUT, 5000ms
CTRL_SHUTDOWN_EVENTservice processsystem parameter SPI_GETWAITTOKILLSERVICETIMEOUT, 20000ms
CTRL_SHUTDOWN_EVENTCONSOLE_QUICK_RESOLVE_FLAG[1]registry key CriticalAppShutdownTimeout or 500ms
CTRL_SHUTDOWN_EVENTnone of the abovesystem parameter SPI_GETWAITTOKILLTIMEOUT, 5000ms
CTRL_C, CTRL_BREAKanyno timeout

[1]: nobody sets CONSOLE_QUICK_RESOLVE_FLAG.