From c521e13444cd2b09347da20bd7ee2b9facff2133 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Fri, 23 Jan 2009 18:12:25 +0100 Subject: [PATCH] Fix kill_io() to only call kill(2) when pid is non-zero --- tig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tig.c b/tig.c index 010efc5..9e80d15 100644 --- a/tig.c +++ b/tig.c @@ -368,7 +368,7 @@ io_open(struct io *io, const char *name) static bool kill_io(struct io *io) { - return kill(io->pid, SIGKILL) != -1; + return io->pid == 0 || kill(io->pid, SIGKILL) != -1; } static bool -- 2.32.0.93.g670b81a890