From: Jonas Fonseca Date: Fri, 23 Jan 2009 17:12:25 +0000 (+0100) Subject: Fix kill_io() to only call kill(2) when pid is non-zero X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c521e13444cd2b09347da20bd7ee2b9facff2133;p=tig.git Fix kill_io() to only call kill(2) when pid is non-zero --- 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