Exemplo n.º 1
0
/* ^Y */
static void tstop()
{
    /* Nothing if inhibited */
    if(nosignal) {
	return;
    }

    lcreat((char *)0);
    clearvt100();
    lflush();
    signal(SIGTSTP, SIG_DFL);

#ifdef SIGVTALRM
    /* Looks like BSD4.2 or higher - must clr mask for signal to take effect */

    sigset_t set;
    sigprocmask(0, NULL, &set);
    sigprocmask(~BIT(SIGTSTP) & SIG_BLOCK, &set, NULL);
#endif

    kill(getpid(), SIGTSTP);
    setupvt100();
    signal(SIGTSTP, tstop);

    if(predostuff == 1) {
	s2choose();
    }
    else {
	drawscreen();
    }

    showplayer();
    lflush();
}
Exemplo n.º 2
0
static void
tstop() /* control Y	*/
	{
	if (nosignal)   return;  /* nothing if inhibited */
	lcreat((char*)0);  clearvt100();	lflush();	  signal(SIGTSTP,SIG_DFL);
#ifdef SIGVTALRM
	/* looks like BSD4.2 or higher - must clr mask for signal to take effect*/
	sigsetmask(sigblock(0)& ~BIT(SIGTSTP));
#endif
	kill(getpid(),SIGTSTP);

	setupvt100();  signal(SIGTSTP,tstop);
	if (predostuff==1) s2choose(); else drawscreen();
	showplayer();	lflush();
	}