mirror of
https://github.com/git/git.git
synced 2026-01-24 17:41:30 +00:00
This is part two of the Ctrl+C story, where part one is https://github.com/git-for-windows/MSYS2-packages/commit/f4fda0f30aa. Part one took care of extending the signal handling in the MSYS2 runtime such that non-MSYS2 processes "receive" a SIGINT by injecting a remote thread that runs kernel32!CtrlRoutine as if GenerateConsoleCtrlHandler() had been called (but in contrast to the latter, only one process is targeted at a time, not every process attached to the same Console) into the process that needs to be interrupted as well as into all of the spawned child processes. Part two now takes care of removing the misguided "kill all spawned children" atexit() handler, and it also installs a ConsoleCtrl handler to run Git's SIGINT handlers, such as the one waiting for the pager to exit. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>