Git development
 help / color / mirror / Atom feed
* [PATCH] compat/mingw: Allow SIGKILL to kill in mingw_kill.
@ 2026-05-22  6:16 Siddh Raman Pant
  2026-05-22  6:32 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Siddh Raman Pant @ 2026-05-22  6:16 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Kristoffer Haugsbakk, Elijah Newren,
	Patrick Steinhardt

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.

Signed-off-by: Siddh Raman Pant <siddh.raman.pant@oracle.com>
---
 compat/mingw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compat/mingw.c b/compat/mingw.c
index aa7525f419cb..00a994aa9f47 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -2250,7 +2250,7 @@ int mingw_execvp(const char *cmd, char *const *argv)
 
 int mingw_kill(pid_t pid, int sig)
 {
-	if (pid > 0 && sig == SIGTERM) {
+	if (pid > 0 && (sig == SIGTERM || sig == SIGKILL)) {
 		HANDLE h = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
 
 		if (TerminateProcess(h, -1)) {
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-22  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22  6:16 [PATCH] compat/mingw: Allow SIGKILL to kill in mingw_kill Siddh Raman Pant
2026-05-22  6:32 ` Junio C Hamano
2026-05-22  8:03   ` Siddh Raman Pant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox