summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.c b/main.c
index 5dc3e7c8..1ec130e9 100644
--- a/main.c
+++ b/main.c
@@ -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)