switch(ch) {
case CF1: show_key_mappings(); break;
case CF3: toggle_scroll(); break; /* hardware <-> software */
- case CF7: sigchar(&tty_table[CONSOLE], SIGQUIT); break;
- case CF8: sigchar(&tty_table[CONSOLE], SIGINT); break;
- case CF9: sigchar(&tty_table[CONSOLE], SIGKILL); break;
+ case CF7: sigchar(&tty_table[CONSOLE], SIGQUIT, 1); break;
+ case CF8: sigchar(&tty_table[CONSOLE], SIGINT, 1); break;
+ case CF9: sigchar(&tty_table[CONSOLE], SIGKILL, 1); break;
}
}
}
r = sys_vircopy( m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
SELF, D, (vir_bytes) &tp->tty_winsize, (vir_bytes) size);
}
- sigchar(tp, SIGWINCH);
+ sigchar(tp, SIGWINCH, 0);
break;
#if (MACHINE == IBM_PC)
|| ch == tp->tty_termios.c_cc[VQUIT]) {
sig = SIGINT;
if (ch == tp->tty_termios.c_cc[VQUIT]) sig = SIGQUIT;
- sigchar(tp, sig);
+ sigchar(tp, sig, 1);
(void) tty_echo(tp, ch);
continue;
}
}
/* Setting the output speed to zero hangs up the phone. */
- if (tp->tty_termios.c_ospeed == B0) sigchar(tp, SIGHUP);
+ if (tp->tty_termios.c_ospeed == B0) sigchar(tp, SIGHUP, 1);
/* Set new line speed, character size, etc at the device level. */
(*tp->tty_ioctl)(tp, 0);
/*===========================================================================*
* sigchar *
*===========================================================================*/
-PUBLIC void sigchar(tp, sig)
+PUBLIC void sigchar(tp, sig, mayflush)
register tty_t *tp;
int sig; /* SIGINT, SIGQUIT, SIGKILL or SIGHUP */
+int mayflush;
{
/* Process a SIGINT, SIGQUIT or SIGKILL char from the keyboard or SIGHUP from
* a tty close, "stty 0", or a real RS-232 hangup. MM will send the signal to
}
}
- if (!(tp->tty_termios.c_lflag & NOFLSH)) {
+ if (mayflush && !(tp->tty_termios.c_lflag & NOFLSH)) {
tp->tty_incount = tp->tty_eotct = 0; /* kill earlier input */
tp->tty_intail = tp->tty_inhead;
(*tp->tty_ocancel)(tp, 0); /* kill all output */
/* Function prototypes for TTY driver. */
/* tty.c */
_PROTOTYPE( void handle_events, (struct tty *tp) );
-_PROTOTYPE( void sigchar, (struct tty *tp, int sig) );
+_PROTOTYPE( void sigchar, (struct tty *tp, int sig, int mayflush) );
_PROTOTYPE( void tty_task, (void) );
_PROTOTYPE( int in_process, (struct tty *tp, char *buf, int count) );
_PROTOTYPE( void out_process, (struct tty *tp, char *bstart, char *bpos,