Move fflush() from signal handler into endwin(), that way it will work in
authortholo <tholo@openbsd.org>
Thu, 5 Sep 1996 05:09:10 +0000 (05:09 +0000)
committertholo <tholo@openbsd.org>
Thu, 5 Sep 1996 05:09:10 +0000 (05:09 +0000)
some other common situations too.

lib/libcurses/lib_endwin.c
lib/libcurses/lib_tstp.c

index 065b5c7..bda6e19 100644 (file)
@@ -51,5 +51,7 @@ endwin(void)
        if (curscr  &&  (curscr->_attrs != A_NORMAL)) 
            vidattr(curscr->_attrs = A_NORMAL);
 
+       fflush(SP->_ofp);
+
        return(reset_shell_mode());
 }
index 7adca9e..73be68a 100644 (file)
@@ -117,7 +117,6 @@ static void tstp(int dummy)
         * original (pre-curses) modes.
         */
        endwin();
-fflush(stdout);
 
        /* Unblock SIGTSTP. */
        (void)sigemptyset(&mask);