aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-10-07 19:31:12 -0500
committerRob Landley <rob@landley.net>2012-10-07 19:31:12 -0500
commitb77293f660128aa39cf476d03f3f0e4770c355ad (patch)
tree7be2c3e8ad65a343431ebd2894cfc6000fd45d7c /lib
parent4cd9dffe67eac471fd3742084c203878a1485e0e (diff)
downloadtoybox-b77293f660128aa39cf476d03f3f0e4770c355ad.tar.gz
Fix thinko in xpidfile()
Diffstat (limited to 'lib')
-rw-r--r--lib/lib.c2
1 files changed, 1 insertions, 1 deletions
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.
}