chiark / gitweb /
selinux: use setcon() instead of reexec to apply selinux policy
[elogind.git] / src / pager.c
index 6ea25ada65f93f2d6ee2123eedd012edb34dee84..be284da9622b7a66776fc168928553748d325c7c 100644 (file)
@@ -39,13 +39,13 @@ void pager_open(void) {
         if (pager_pid > 0)
                 return;
 
-        if (isatty(STDOUT_FILENO) <= 0)
-                return;
-
         if ((pager = getenv("SYSTEMD_PAGER")) || (pager = getenv("PAGER")))
                 if (!*pager || streq(pager, "cat"))
                         return;
 
+        if (isatty(STDOUT_FILENO) <= 0)
+                return;
+
         /* Determine and cache number of columns before we spawn the
          * pager so that we get the value from the actual tty */
         columns();