149b35c3
by Eric Pouech at 2025-04-29T15:20:04+02:00
conhost: Handle ctrl-c from unix console in ReadConsoleW + control.
For a unix console, don't kill console directly when not in
ENABLE_PROCESSED_INPUT mode.
This will allow proper handling of ctrl-c as a control character in
ReadConsoleW with a control block,
Note: this patch can change behavior of a unix console (depending on console
mode and how attached programs behave against a ctrl-c event).
If the unix console is not in ENABLE_PROCESSED_INPUT mode, ctrl-c will no
longer kill immediately the console, but rather now generates a ctrl-c event
to all applications attached to the console (or be handled in ReadConsole
with a control context).
This could mean that the application can also block its termination with
a proper handler. If that's the case, the console won't be closed.
As a reminder, ctrl-\ is still a valid way to terminate all applications
attached to a unix console whatever the console mode.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>