]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/pager: Remove unused code
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 23 Feb 2026 19:01:50 +0000 (20:01 +0100)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 23 Feb 2026 19:09:14 +0000 (20:09 +0100)
The pager_process.pid check already happens before wait_for_pager is
called now.

Also, errno is not used anymore after the signal handler, so no need to
save it.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/pager.c

index b6321d2b0d30ae3e14c23f3ffca2e0b7f7ad089c..3f767287b766138d4c47307ba2a219877511aad3 100644 (file)
@@ -104,9 +104,6 @@ static int wait_for_pager(void)
        pid_t waiting;
        int status;
 
-       if (!pager_process.pid)
-               return 0;
-
        do {
                waiting = waitpid(pager_process.pid, &status, 0);
        } while (waiting == -1 && errno == EINTR);
@@ -134,8 +131,6 @@ static void catch_sigpipe(int signo)
 
 static void wait_for_pager_signal(int signo __attribute__ ((__unused__)))
 {
-       UL_PROTECT_ERRNO;
-
        /* signal EOF to pager */
        close(STDOUT_FILENO);
        close(STDERR_FILENO);