summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shared/pager.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/shared/pager.c b/src/shared/pager.c
index 13f03e798b..a5454e377d 100644
--- a/src/shared/pager.c
+++ b/src/shared/pager.c
@@ -31,18 +31,16 @@
#include "macro.h"
#include "terminal-util.h"
#include "signal-util.h"
+#include "copy.h"
static pid_t pager_pid = 0;
noreturn static void pager_fallback(void) {
- ssize_t n;
-
- do {
- n = splice(STDIN_FILENO, NULL, STDOUT_FILENO, NULL, 64*1024, 0);
- } while (n > 0);
+ int r;
- if (n < 0) {
- log_error_errno(errno, "Internal pager failed: %m");
+ r = copy_bytes(STDIN_FILENO, STDOUT_FILENO, (off_t) -1, false);
+ if (r < 0) {
+ log_error_errno(r, "Internal pager failed: %m");
_exit(EXIT_FAILURE);
}