The signals are registered without SA_RESETHAND, which means that the
same signal handler is called over and over again.
This just works because eventually, the waitpid call will fail, leading
to a suppressed error message (because stderr is already closed) and
then an _exit(EXIT_FAILURE) call.
Just call _exit(EXIT_FAILURE) directly to avoid unneeded and failing
system calls.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
} while (waiting == -1);
}
-static void wait_for_pager_signal(int signo)
+static void wait_for_pager_signal(int signo __attribute__ ((__unused__)))
{
UL_PROTECT_ERRNO;
wait_for_pager();
- raise(signo);
+ _exit(EXIT_FAILURE);
}
static int has_command(const char *cmd)