Mercurial > hg > toybox
diff lib/lib.c @ 671:e4b96507688a
Fix thinko in xpidfile()
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 07 Oct 2012 19:31:12 -0500 |
parents | 2b957eaa00c7 |
children | 786841fdb1e0 |
line wrap: on
line diff
--- a/lib/lib.c Sat Oct 06 19:07:34 2012 -0500 +++ b/lib/lib.c Sun Oct 07 19:31:12 2012 -0500 @@ -672,7 +672,7 @@ 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. }