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.
This commit is contained in:
committed by
Lennart Poettering
parent
d89d6c86d9
commit
82910f1358
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user