]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/pager: Call _exit in signal handler, not raise
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 2 Feb 2026 20:21:07 +0000 (21:21 +0100)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 2 Feb 2026 20:21:07 +0000 (21:21 +0100)
commit484bdc5ca6c4b1b80ae03b24142f65e8efa5e95b
tree766868c64eae60ab95585c3972cc1f9e8e7ecdc7
parentdcdf40efec22fc6a3eb2d41991f8fadcd78f110a
lib/pager: Call _exit in signal handler, not raise

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>
lib/pager.c