Windows handling CTRL+C in different thread? Windows handling CTRL+C in different thread? windows windows

Windows handling CTRL+C in different thread?


From MSDN topic HandlerRoutine:

A HandlerRoutine function is an application-defined function used with the SetConsoleCtrlHandler function. A console process uses this function to handle control signals received by the process. When the signal is received, the system creates a new thread in the process to execute the function.

So, the answer is: this is impossible.