Do not wait for user input on PAGER exit - sacc - sacc(omys), simple console gopher client HTML git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ DIR Log DIR Files DIR Refs DIR Tags DIR LICENSE --- DIR commit ff115925b71781e2f000218d6d0e9d624c863cdb DIR parent 1ac106d2827cab446cf673c12c021ae7d2cee9fe HTML Author: Quentin Rameau <quinq@fifth.space> Date: Fri, 25 Aug 2017 14:07:43 +0200 Do not wait for user input on PAGER exit This is handy if your pager automatically exits without prompting the user, but this isn't the behaviour recommended by POSIX more, so the user is responsible for it otherwise. Diffstat: M sacc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) --- DIR diff --git a/sacc.c b/sacc.c @@ -172,7 +172,7 @@ static void displaytextitem(Item *item) { FILE *pagerin; - int pid, wpid, status; + int pid, wpid; uicleanup(); switch (pid = fork()) { @@ -183,11 +183,7 @@ displaytextitem(Item *item) parent = 0; pagerin = popen("$PAGER", "we"); fputs(item->raw, pagerin); - status = pclose(pagerin); - fputs("[Press Enter to continue]", stdout); - fflush(stdout); - getchar(); - exit(status); + exit(pclose(pagerin)); default: while ((wpid = wait(NULL)) >= 0 && wpid != pid) ;