diff options
-rw-r--r-- | main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -419,6 +419,9 @@ main(int argc, char *argv[]) if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths)) return((int)MANDOCLEVEL_BADARG); + if (pager_pid == 1 && isatty(STDOUT_FILENO) == 0) + pager_pid = 0; + curp.mchars = mchars_alloc(); curp.mp = mparse_alloc(options, curp.wlevel, mmsg, curp.mchars, defos); @@ -430,7 +433,7 @@ main(int argc, char *argv[]) mparse_keep(curp.mp); if (argc < 1) { - if (pager_pid == 1 && isatty(STDOUT_FILENO)) + if (pager_pid == 1) pager_pid = spawn_pager(); parse(&curp, STDIN_FILENO, "<stdin>"); } @@ -442,7 +445,7 @@ main(int argc, char *argv[]) rc = rctmp; if (fd != -1) { - if (pager_pid == 1 && isatty(STDOUT_FILENO)) + if (pager_pid == 1) pager_pid = spawn_pager(); if (resp == NULL) |