]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/timer.c: remove bogus SA_SIGINFO from timer_settime call
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Wed, 26 Apr 2017 10:56:08 +0000 (12:56 +0200)
committerRasmus Villemoes <rasmus.villemoes@prevas.dk>
Wed, 26 Apr 2017 11:35:18 +0000 (13:35 +0200)
The only valid flag for timer_settime is TIMER_ABSTIME, which we
certainly don't want here. This seems to be harmless since
timer_settime doesn't validate the flags parameter, TIMER_ABSTIME is
universally 0x1, and no architecture has SA_SIGINFO == 1.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
lib/timer.c

index 05fbd92f57adfa1ebd2b0be853937ab3f79ad2a2..143c3a63a002ccd7b795c7e02760b7e1f52e3ecd 100644 (file)
@@ -35,7 +35,7 @@ int setup_timer(timer_t * t_id, struct itimerval *timeout,
                return 1;
        if (timer_create(CLOCK_MONOTONIC, &sig_e, t_id))
                return 1;
-       if (timer_settime(*t_id, SA_SIGINFO, &val, NULL))
+       if (timer_settime(*t_id, 0, &val, NULL))
                return 1;
        return 0;
 }