• Paul Eggert's avatar
    Simplify timerfd configuration and fix some minor glitches. · 5c6476b4
    Paul Eggert authored
    * configure.ac (HAVE_TIMERFD): Define only if TFD_CLOEXEC works,
    since the code leaked file descriptors to children when !TFD_CLOEXEC.
    (HAVE_TIMERFD_CLOEXEC): Remove; no longer used.
    * m4/clock_time.m4 (gl_CLOCK_TIME): Don't check for clock_getres.
    This reverts the previous change to this file, so it matches
    gnulib again.
    * src/atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
    (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
    Fall back on timer_create if timerfd_create fails at runtime.
    (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
    kernel primitives to do resolution.  All uses removed.
    (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
    (turn_on_atimers): Clear timer_create-based timers too,
    for consistency.
    5c6476b4
clock_time.m4 1.33 KB