don't flush output for SIGWINCH. found by Joren l'Ami.
This commit is contained in:
parent
65a9f0253b
commit
4cd6875d05
@ -609,9 +609,9 @@ int try;
|
|||||||
switch(ch) {
|
switch(ch) {
|
||||||
case CF1: show_key_mappings(); break;
|
case CF1: show_key_mappings(); break;
|
||||||
case CF3: toggle_scroll(); break; /* hardware <-> software */
|
case CF3: toggle_scroll(); break; /* hardware <-> software */
|
||||||
case CF7: sigchar(&tty_table[CONSOLE], SIGQUIT); break;
|
case CF7: sigchar(&tty_table[CONSOLE], SIGQUIT, 1); break;
|
||||||
case CF8: sigchar(&tty_table[CONSOLE], SIGINT); break;
|
case CF8: sigchar(&tty_table[CONSOLE], SIGINT, 1); break;
|
||||||
case CF9: sigchar(&tty_table[CONSOLE], SIGKILL); break;
|
case CF9: sigchar(&tty_table[CONSOLE], SIGKILL, 1); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ message *m_ptr;
|
|||||||
pp->state = 0;
|
pp->state = 0;
|
||||||
} else {
|
} else {
|
||||||
pp->state |= PTY_CLOSED;
|
pp->state |= PTY_CLOSED;
|
||||||
sigchar(tp, SIGHUP);
|
sigchar(tp, SIGHUP, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -612,7 +612,7 @@ int try;
|
|||||||
rs->ostate &= ~ODEVHUP; /* save ostate, clear DEVHUP */
|
rs->ostate &= ~ODEVHUP; /* save ostate, clear DEVHUP */
|
||||||
unlock();
|
unlock();
|
||||||
if (ostate & ODEVHUP) {
|
if (ostate & ODEVHUP) {
|
||||||
sigchar(tp, SIGHUP);
|
sigchar(tp, SIGHUP, 1);
|
||||||
tp->tty_termios.c_ospeed = B0; /* Disable further I/O. */
|
tp->tty_termios.c_ospeed = B0; /* Disable further I/O. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -672,7 +672,7 @@ int safe;
|
|||||||
r = sys_vircopy( m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
|
r = sys_vircopy( m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
|
||||||
SELF, D, (vir_bytes) &tp->tty_winsize, (vir_bytes) size);
|
SELF, D, (vir_bytes) &tp->tty_winsize, (vir_bytes) size);
|
||||||
}
|
}
|
||||||
sigchar(tp, SIGWINCH);
|
sigchar(tp, SIGWINCH, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if (MACHINE == IBM_PC)
|
#if (MACHINE == IBM_PC)
|
||||||
@ -1097,7 +1097,7 @@ int count; /* number of input characters */
|
|||||||
|| ch == tp->tty_termios.c_cc[VQUIT]) {
|
|| ch == tp->tty_termios.c_cc[VQUIT]) {
|
||||||
sig = SIGINT;
|
sig = SIGINT;
|
||||||
if (ch == tp->tty_termios.c_cc[VQUIT]) sig = SIGQUIT;
|
if (ch == tp->tty_termios.c_cc[VQUIT]) sig = SIGQUIT;
|
||||||
sigchar(tp, sig);
|
sigchar(tp, sig, 1);
|
||||||
(void) tty_echo(tp, ch);
|
(void) tty_echo(tp, ch);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1445,7 +1445,7 @@ tty_t *tp;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Setting the output speed to zero hangs up the phone. */
|
/* 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. */
|
/* Set new line speed, character size, etc at the device level. */
|
||||||
(*tp->tty_ioctl)(tp, 0);
|
(*tp->tty_ioctl)(tp, 0);
|
||||||
@ -1489,9 +1489,10 @@ int status; /* reply code */
|
|||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* sigchar *
|
* sigchar *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
PUBLIC void sigchar(tp, sig)
|
PUBLIC void sigchar(tp, sig, mayflush)
|
||||||
register tty_t *tp;
|
register tty_t *tp;
|
||||||
int sig; /* SIGINT, SIGQUIT, SIGKILL or SIGHUP */
|
int sig; /* SIGINT, SIGQUIT, SIGKILL or SIGHUP */
|
||||||
|
int mayflush;
|
||||||
{
|
{
|
||||||
/* Process a SIGINT, SIGQUIT or SIGKILL char from the keyboard or SIGHUP from
|
/* 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
|
* a tty close, "stty 0", or a real RS-232 hangup. MM will send the signal to
|
||||||
@ -1506,7 +1507,7 @@ int sig; /* SIGINT, SIGQUIT, SIGKILL or SIGHUP */
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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_incount = tp->tty_eotct = 0; /* kill earlier input */
|
||||||
tp->tty_intail = tp->tty_inhead;
|
tp->tty_intail = tp->tty_inhead;
|
||||||
(*tp->tty_ocancel)(tp, 0); /* kill all output */
|
(*tp->tty_ocancel)(tp, 0); /* kill all output */
|
||||||
|
@ -148,7 +148,7 @@ extern struct kmessages kmess;
|
|||||||
/* Function prototypes for TTY driver. */
|
/* Function prototypes for TTY driver. */
|
||||||
/* tty.c */
|
/* tty.c */
|
||||||
_PROTOTYPE( void handle_events, (struct tty *tp) );
|
_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( void tty_task, (void) );
|
||||||
_PROTOTYPE( int in_process, (struct tty *tp, char *buf, int count) );
|
_PROTOTYPE( int in_process, (struct tty *tp, char *buf, int count) );
|
||||||
_PROTOTYPE( void out_process, (struct tty *tp, char *bstart, char *bpos,
|
_PROTOTYPE( void out_process, (struct tty *tp, char *bstart, char *bpos,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user