summaryrefslogtreecommitdiffstats
path: root/lib/libcurses/lib_endwin.c
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1996-09-05 05:09:10 +0000
committertholo <tholo@openbsd.org>1996-09-05 05:09:10 +0000
commit523ee1ebf0bf77e7face7856086afe371cc35280 (patch)
treeb8c51dc0a9e6cc699cd2a276e6bd5f64fd575c88 /lib/libcurses/lib_endwin.c
parentAdd strategic fflush() before suspending on keyboard generated signal (diff)
downloadwireguard-openbsd-523ee1ebf0bf77e7face7856086afe371cc35280.tar.xz
wireguard-openbsd-523ee1ebf0bf77e7face7856086afe371cc35280.zip
Move fflush() from signal handler into endwin(), that way it will work in
some other common situations too.
Diffstat (limited to 'lib/libcurses/lib_endwin.c')
-rw-r--r--lib/libcurses/lib_endwin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libcurses/lib_endwin.c b/lib/libcurses/lib_endwin.c
index 065b5c7567b..bda6e1949b8 100644
--- a/lib/libcurses/lib_endwin.c
+++ b/lib/libcurses/lib_endwin.c
@@ -51,5 +51,7 @@ endwin(void)
if (curscr && (curscr->_attrs != A_NORMAL))
vidattr(curscr->_attrs = A_NORMAL);
+ fflush(SP->_ofp);
+
return(reset_shell_mode());
}