old/more/more.c
/* Come here when we get a suspend signal from the terminal */
Come here when we get a suspend signal from the terminal
Come here when we get a suspend signal from the terminal
void
onsusp ()
{
    signal(SIGTTOU, SIG_IGN);
    reset_tty ();
    fflush (stdout);
    signal(SIGTTOU, SIG_DFL);
    signal(SIGTSTP, SIG_DFL);
    sigsetmask(0);
    kill (0, SIGTSTP);
    signal (SIGTSTP, onsusp);
    set_tty ();
    if (inwait)
	    longjmp (restore, 1);
}
void onsusp ( ) { signal ( SIGTTOU , SIG_IGN ) ; reset_tty ( ) ; fflush ( stdout ) ; signal ( SIGTTOU , SIG_DFL ) ; signal ( SIGTSTP , SIG_DFL ) ; sigsetmask ( 0 ) ; kill ( 0 , SIGTSTP ) ; signal ( SIGTSTP , onsusp ) ; set_tty ( ) ; if ( inwait ) longjmp ( restore , 1 ) ; }
Come here when we get a suspend signal from the terminal
Come here when we get a suspend signal from the terminal
/* ignore SIGTTOU so we don't get stopped if csh grabs the tty */ /* Send the TSTP signal to suspend our process group */ /* Pause for station break */ /* We're back */