From b77293f660128aa39cf476d03f3f0e4770c355ad Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 7 Oct 2012 19:31:12 -0500 Subject: Fix thinko in xpidfile() --- lib/lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/lib.c b/lib/lib.c index 3deabda2..2c2ea63e 100644 --- a/lib/lib.c +++ b/lib/lib.c @@ -672,7 +672,7 @@ void xpidfile(char *name) spid[xread(fd, spid, sizeof(spid)-1)] = 0; close(fd); pid = atoi(spid); - if (fd < 1 || kill(pid, 0) == ESRCH) unlink(pidfile); + if (pid < 1 || kill(pid, 0) == ESRCH) unlink(pidfile); // An else with more sanity checking might be nice here. } -- cgit v1.2.3