Package: usplash
Version: 0.5.8-3
Severity: important

The main() function of usplash.c sets up an interval timer with an interval of 40000 microseconds:

        struct timeval t1 = {.tv_sec = 0,.tv_usec = 40000 };
        struct timeval t2 = {.tv_sec = 0,.tv_usec = 40000 };
        struct itimerval iv = {.it_interval = t1,.it_value = t2 };
        ...
        setitimer(ITIMER_REAL, &iv, NULL);

The handle_input() function of libusplash.c uses a sleep(1) if the output pipe cannot be opened yet and loops timeout number of times. Since the sleep call is interrupted by the delivery of the SIGALRM signal from the interval timer, handle_input() ends up waiting at most 40.000 * timeout _microseconds_ rather than timeout _seconds_.

Wrapping the sleep() call in blocksig() and unblocksig() might be one solution.

--
David Härdeman


Reply via email to