chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
polkit: don't spawn local client if we access a remote system
[elogind.git]
/
src
/
shared
/
pager.c
diff --git
a/src/shared/pager.c
b/src/shared/pager.c
index e9aa022a73fe3718f5ebf53935a5a80bf1d88a42..9fa611479cff0cc10b98c7d60ca0dbbfd3e3f00e 100644
(file)
--- a/
src/shared/pager.c
+++ b/
src/shared/pager.c
@@
-34,13
+34,16
@@
static pid_t pager_pid = 0;
_noreturn_ static void pager_fallback(void) {
ssize_t n;
_noreturn_ static void pager_fallback(void) {
ssize_t n;
+
do {
n = splice(STDIN_FILENO, NULL, STDOUT_FILENO, NULL, 64*1024, 0);
} while (n > 0);
do {
n = splice(STDIN_FILENO, NULL, STDOUT_FILENO, NULL, 64*1024, 0);
} while (n > 0);
+
if (n < 0) {
log_error("Internal pager failed: %m");
_exit(EXIT_FAILURE);
}
if (n < 0) {
log_error("Internal pager failed: %m");
_exit(EXIT_FAILURE);
}
+
_exit(EXIT_SUCCESS);
}
_exit(EXIT_SUCCESS);
}
@@
-86,9
+89,9
@@
int pager_open(bool jump_to_end) {
close_pipe(fd);
if (jump_to_end)
close_pipe(fd);
if (jump_to_end)
- setenv("LESS", "FRSXK+G", 1);
+ setenv("LESS", "FRSX
M
K+G", 1);
else
else
- setenv("LESS", "FRSXK", 1);
+ setenv("LESS", "FRSX
M
K", 1);
/* Make sure the pager goes away when the parent dies */
if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)
/* Make sure the pager goes away when the parent dies */
if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)