summaryrefslogtreecommitdiffstats
path: root/libdaemon/dpid.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdaemon/dpid.c')
-rw-r--r--libdaemon/dpid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdaemon/dpid.c b/libdaemon/dpid.c
index 7c90297..678826c 100644
--- a/libdaemon/dpid.c
+++ b/libdaemon/dpid.c
@@ -147,8 +147,10 @@ int daemon_pid_file_kill_wait(int s, int m) {
int r;
struct timeval tv = { 0, 100000 };
- if (time(NULL) > t)
+ if (time(NULL) > t) {
+ errno = ETIME;
return -1;
+ }
if ((r = kill(pid, 0)) < 0 && errno != ESRCH)
return -1;