git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] compat/mingw: Allow SIGKILL to kill in mingw_kill.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 28, 2026, 13:11 UTC
Message-ID
<7c0384e2-0d8c-17f2-9881-cf14b24c0a21@gmx.de>
In-Reply-To
<xmqqwlwwt0mj.fsf@gitster.g>
Hi Junio & Siddh,
On Fri, 22 May 2026, Junio C Hamano wrote:
Show 21 quoted lines
> Siddh Raman Pant <siddh.raman.pant@oracle.com> writes:
> 
> > mingw_kill() only allows SIGTERM for killing a process.
> >
> > Let's also allow the natural SIGKILL for the same so that callers don't
> > have to do ifdef soup for special Windows handling.
>
> [...]
> 
> The current code only handles TERM (to terminate) or 0 (to probe)
> and everything else results in EINVAL, so the updated behaviour is
> to pretend as if TERM is sent and do whatever PROCESS_TERMINATE
> does, instead of doing nothing and erroring with EINVAL.  Which does
> sound like an improvement over the status quo.
> 
> What I am wondering is if there are different kind of "kill" in the
> Windows land, just like there are distinction between TERM and KILL.
> For example, the program ought to be able to block TERM but not
> KILL.  There are other termination-inducing signals like SIGQUIT but
> until we start using them in our code, this emulation layer does not
> have to know about them, I think.

The version that that Git for Windows carries is actually really different. For one, it gives processes a chance to run their `atexit()` handlers when being terminated via `SIGTERM`.

I'm afraid that the patch under discussion would severely conflict with Git for Windows' code. Git for Windows' code, that is, that should have been upstreamed a long time ago, but wasn't, out of time constraints.

I'll try to polish the patches and upstream them.

Ciao, Johannes

Previous: Siddh Raman PantNext: Junio C Hamano
Message 4 of 5 in “compat/mingw: Allow SIGKILL to kill in mingw_kill.”
  1. compat/mingw: Allow SIGKILL to kill in mingw_kill.Siddh Raman Pant, May 22, 2026
  2. Junio C HamanoMay 22, 2026
  3. Siddh Raman PantMay 22, 2026
  4. Johannes SchindelinMay 28, 2026
  5. Junio C HamanoMay 28, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.