Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
etc: Add environment option to run init.d/ashd silently.
[ashd.git]
/
lib
/
mtio-kqueue.c
diff --git
a/lib/mtio-kqueue.c
b/lib/mtio-kqueue.c
index
b4e7427
..
7d086e2
100644
(file)
--- a/
lib/mtio-kqueue.c
+++ b/
lib/mtio-kqueue.c
@@
-287,12
+287,13
@@
int ioloop(void)
}
while(blockers != NULL) {
now = time(NULL);
}
while(blockers != NULL) {
now = time(NULL);
+ toval = &(struct timespec){};
if(timeheap.d == 0)
toval = NULL;
else if(timeheap.b[0]->to > now)
if(timeheap.d == 0)
toval = NULL;
else if(timeheap.b[0]->to > now)
-
toval = &
(struct timespec){.tv_sec = timeheap.b[0]->to - now};
+
*toval =
(struct timespec){.tv_sec = timeheap.b[0]->to - now};
else
else
-
toval = &
(struct timespec){.tv_sec = 1};
+
*toval =
(struct timespec){.tv_sec = 1};
if(exitstatus)
break;
nev = kevent(qfd, NULL, 0, evs, sizeof(evs) / sizeof(*evs), toval);
if(exitstatus)
break;
nev = kevent(qfd, NULL, 0, evs, sizeof(evs) / sizeof(*evs), toval);