]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/pager: do not wait for process again after FORK_WAIT
authorMike Yuan <me@yhndnzj.com>
Fri, 27 Feb 2026 15:51:10 +0000 (16:51 +0100)
committerMike Yuan <me@yhndnzj.com>
Sat, 28 Feb 2026 11:00:52 +0000 (12:00 +0100)
Follow-up for fbd276cb86a2f0292cc19fd57ee3d72bf73592dc

Fixes #40873

src/shared/pager.c

index d7d9f4259651a0833ce9c3ccd6530d530caa37eb..3c89aacab48d026dbff6f3f0edb9c883cfd23232 100644 (file)
@@ -322,11 +322,10 @@ int show_man_page(const char *desc, bool null_stdio) {
         } else
                 args[1] = desc;
 
-        _cleanup_(pidref_done) PidRef pidref = PIDREF_NULL;
         r = pidref_safe_fork(
                         "(man)",
                         FORK_RESET_SIGNALS|FORK_DEATHSIG_SIGTERM|(null_stdio ? FORK_REARRANGE_STDIO : 0)|FORK_RLIMIT_NOFILE_SAFE|FORK_LOG|FORK_WAIT,
-                        &pidref);
+                        /* ret = */ NULL);
         if (r < 0)
                 return r;
         if (r == 0) {
@@ -336,5 +335,5 @@ int show_man_page(const char *desc, bool null_stdio) {
                 _exit(EXIT_FAILURE);
         }
 
-        return pidref_wait_for_terminate_and_check(NULL, &pidref, 0);
+        return 0;
 }