projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6dd79b
)
Fix for xpidfile spotted by Felix Janda.
author
Rob Landley
<rob@landley.net>
Fri, 6 Sep 2013 09:45:36 +0000
(
04:45
-0500)
committer
Rob Landley
<rob@landley.net>
Fri, 6 Sep 2013 09:45:36 +0000
(
04:45
-0500)
lib/xwrap.c
patch
|
blob
|
history
diff --git
a/lib/xwrap.c
b/lib/xwrap.c
index
90c4d86
..
fdd2db4
100644
(file)
--- a/
lib/xwrap.c
+++ b/
lib/xwrap.c
@@
-463,7
+463,7
@@
void xpidfile(char *name)
spid[xread(fd, spid, sizeof(spid)-1)] = 0;
close(fd);
pid = atoi(spid);
- if (pid < 1 ||
kill(pid, 0) == ESRCH
) unlink(pidfile);
+ if (pid < 1 ||
(kill(pid, 0) && errno == ESRCH)
) unlink(pidfile);
// An else with more sanity checking might be nice here.
}