projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d89d6c8
)
pager: add K to less environment
author
Lukas Nykryn
<lnykryn@redhat.com>
Wed, 27 Feb 2013 15:26:59 +0000
(16:26 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 1 Mar 2013 12:51:43 +0000
(13:51 +0100)
Using less as a pager sometimes breaks terminal when output
is interrupted by ctrl-c.
Reproducer: run 'sudo journalctl' ctrl-c.
Thanks mbriza@redhat.com for the solution.
src/shared/pager.c
patch
|
blob
|
history
diff --git
a/src/shared/pager.c
b/src/shared/pager.c
index
488a12c
..
5165d2b
100644
(file)
--- a/
src/shared/pager.c
+++ b/
src/shared/pager.c
@@
-85,7
+85,7
@@
int pager_open(void) {
dup2(fd[0], STDIN_FILENO);
close_pipe(fd);
- setenv("LESS", "FRSX", 0);
+ setenv("LESS", "FRSX
K
", 0);
/* Make sure the pager goes away when the parent dies */
if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)