diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-25 15:29:59 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-25 15:29:59 -0500 |
commit | 06fb28b16eb4b6170c2e2c0cf1f673730309509b (patch) | |
tree | 785adf7225d02701b4b0418c61ef0c0c3a24848b /src/shared/pager.c | |
parent | 8984d7bb5cc1d34cae4ec31696974a9e9f0dca44 (diff) | |
parent | ea4b98e6577ad4311e4eb4d2384c82f0d870b5ba (diff) |
Merge pull request #2671 from 0xAX/move-pager-open-to-one-place
tree-wide: merge pager_open_if_enabled() to the pager_open()
Diffstat (limited to 'src/shared/pager.c')
-rw-r--r-- | src/shared/pager.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/pager.c b/src/shared/pager.c index 05b2b15e40..c16bc027be 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c @@ -52,11 +52,14 @@ noreturn static void pager_fallback(void) { _exit(EXIT_SUCCESS); } -int pager_open(bool jump_to_end) { +int pager_open(bool no_pager, bool jump_to_end) { _cleanup_close_pair_ int fd[2] = { -1, -1 }; const char *pager; pid_t parent_pid; + if (no_pager) + return 0; + if (pager_pid > 0) return 1; |