diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2017-12-05 20:31:46 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2017-12-05 20:31:46 +0000 |
commit | 44af7db6048e7327fcbf501407443c0cdc90c7eb (patch) | |
tree | a2c1c91be4138d4f8655a5adedb8d35e522a1170 /sbin/isakmpd/isakmpd.c | |
parent | 592710a2059adb8aacec869dacfbaca0d473fc0b (diff) |
Use clock_gettime(CLOCK_MONOTONIC) to schedule timers
From Scott Cheloha, ok tb@
Diffstat (limited to 'sbin/isakmpd/isakmpd.c')
-rw-r--r-- | sbin/isakmpd/isakmpd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/isakmpd/isakmpd.c b/sbin/isakmpd/isakmpd.c index 9142d863040..b957e7dc1cd 100644 --- a/sbin/isakmpd/isakmpd.c +++ b/sbin/isakmpd/isakmpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isakmpd.c,v 1.104 2016/04/02 14:37:42 krw Exp $ */ +/* $OpenBSD: isakmpd.c,v 1.105 2017/12/05 20:31:45 jca Exp $ */ /* $EOM: isakmpd.c,v 1.54 2000/10/05 09:28:22 niklas Exp $ */ /* @@ -391,7 +391,7 @@ main(int argc, char *argv[]) fd_set *rfds, *wfds; int n, m; size_t mask_size; - struct timeval tv, *timeout; + struct timespec ts, *timeout; closefrom(STDERR_FILENO + 1); @@ -505,10 +505,10 @@ main(int argc, char *argv[]) n = m; /* Find out when the next timed event is. */ - timeout = &tv; + timeout = &ts; timer_next_event(&timeout); - n = select(n, rfds, wfds, 0, timeout); + n = pselect(n, rfds, wfds, NULL, timeout, NULL); if (n == -1) { if (errno != EINTR) { log_error("main: select"); |