diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2013-02-27 16:26:59 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-03-01 13:51:43 +0100 |
commit | 82910f1358c1d15f4e432e6d1f42efdeaf1eddb1 (patch) | |
tree | dc80ceb9cf15debccdbefe244d1c2c0329f96f49 /src/shared/pager.c | |
parent | d89d6c86d9f141e0fb6939b7fc4f5ea068750690 (diff) |
pager: add K to less environment
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.
Diffstat (limited to 'src/shared/pager.c')
-rw-r--r-- | src/shared/pager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/pager.c b/src/shared/pager.c index 488a12c763..5165d2b1c8 100644 --- 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", "FRSXK", 0); /* Make sure the pager goes away when the parent dies */ if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0) |