Commit 780800b
committed
mingw: kill unterminated child processes on signals
Git for Windows' MSYS2 runtime was just adjusted to kill processes
gently, by injecting a thread that calls ExitProcess(). In case of
signals (such as when handling Ctrl+C in a MinTTY window), the exit code
is 128 + sign_no, as expected by Git's source code.
However, as there is no POSIX signal handling on Windows, no signal
handlers are called. Instead, functions registered via atexit() are
called. We work around that by testing the exit code explicitly.
This fixes the Git for Windows side of the bug where interrupting `git
clone https://...` would send the spawned-off `git remote-https` process
into the background instead of interrupting it, i.e. the clone would
continue and its progress would be reported mercilessly to the console
window without the user being able to do anything about it (short of
firing up the task manager and killing the appropriate task manually).
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 1ada9bf commit 780800b
1 file changed
+44
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
1502 | 1534 | | |
1503 | 1535 | | |
1504 | 1536 | | |
1505 | 1537 | | |
| 1538 | + | |
1506 | 1539 | | |
1507 | 1540 | | |
1508 | 1541 | | |
| |||
1511 | 1544 | | |
1512 | 1545 | | |
1513 | 1546 | | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
1514 | 1558 | | |
1515 | 1559 | | |
1516 | 1560 | | |
| |||
0 commit comments