panic if CLOCK_MONOTONIC is unsupported

This commit is contained in:
Alexandre Ratchov 2015-12-22 13:17:00 +01:00
parent 02a873aace
commit 8af6aa7130
1 changed files with 6 additions and 7 deletions

View File

@ -46,7 +46,6 @@
#include <sys/types.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
@ -446,14 +445,14 @@ filelist_init(void)
{
sigset_t set;
sigemptyset(&set);
(void)sigaddset(&set, SIGPIPE);
if (sigprocmask(SIG_BLOCK, &set, NULL))
err(1, "sigprocmask");
file_list = NULL;
if (clock_gettime(CLOCK_MONOTONIC, &file_ts) < 0) {
err(1, "clock_gettime");
log_puts("filelist_init: CLOCK_MONOTONIC unsupported\n");
panic();
}
sigemptyset(&set);
sigaddset(&set, SIGPIPE);
sigprocmask(SIG_BLOCK, &set, NULL);
file_list = NULL;
log_sync = 0;
timo_init();
}