From dcf5aa013861081fcc71ce56304631ea0b9eb065 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 13 Oct 2003 21:08:50 +0000 Subject: [PATCH] Use the one remaining free termios control character slot for a tty checkpoint capability, which defaults to ^E and sends the SIGCKPT signal. --- sys/emulation/ibcs2/i386/ibcs2_ioctl.c | 3 ++- sys/kern/tty.c | 7 ++++++- sys/sys/termios.h | 5 ++--- sys/sys/ttydefaults.h | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/emulation/ibcs2/i386/ibcs2_ioctl.c b/sys/emulation/ibcs2/i386/ibcs2_ioctl.c index d3ade26904..62376f3952 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_ioctl.c +++ b/sys/emulation/ibcs2/i386/ibcs2_ioctl.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/ibcs2/ibcs2_ioctl.c,v 1.13.2.1 2001/07/31 20:14:21 jon Exp $ - * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_ioctl.c,v 1.7 2003/08/27 06:30:03 rob Exp $ + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_ioctl.c,v 1.8 2003/10/13 21:08:46 dillon Exp $ */ #include @@ -218,6 +218,7 @@ stios2btios(st, bt) bt->c_cc[VWERASE] = _POSIX_VDISABLE; bt->c_cc[VLNEXT] = _POSIX_VDISABLE; bt->c_cc[VSTATUS] = _POSIX_VDISABLE; + bt->c_cc[VCHECKPT] = _POSIX_VDISABLE; } static void diff --git a/sys/kern/tty.c b/sys/kern/tty.c index f61a0807a5..084e14abca 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -37,7 +37,7 @@ * * @(#)tty.c 8.8 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/tty.c,v 1.129.2.5 2002/03/11 01:32:31 dd Exp $ - * $DragonFly: src/sys/kern/tty.c,v 1.7 2003/08/26 21:09:02 rob Exp $ + * $DragonFly: src/sys/kern/tty.c,v 1.8 2003/10/13 21:08:48 dillon Exp $ */ /*- @@ -531,6 +531,11 @@ parmrk: ttyinfo(tp); goto endcase; } + if (CCEQ(cc[VCHECKPT], c) && ISSET(lflag, IEXTEN)) { + if (ISSET(lflag, ISIG)) + pgsignal(tp->t_pgrp, SIGCKPT, 1); + goto endcase; + } } /* * Check for input buffer overflow diff --git a/sys/sys/termios.h b/sys/sys/termios.h index 538640fa66..30435667a8 100644 --- a/sys/sys/termios.h +++ b/sys/sys/termios.h @@ -32,7 +32,7 @@ * * @(#)termios.h 8.3 (Berkeley) 3/28/94 * $FreeBSD: src/sys/sys/termios.h,v 1.13.2.1 2001/03/06 06:31:44 jhb Exp $ - * $DragonFly: src/sys/sys/termios.h,v 1.3 2003/08/20 07:31:21 rob Exp $ + * $DragonFly: src/sys/sys/termios.h,v 1.4 2003/10/13 21:08:50 dillon Exp $ */ #ifndef _SYS_TERMIOS_H_ @@ -59,7 +59,6 @@ #define VREPRINT 6 /* ICANON together with IEXTEN */ #define VERASE2 7 /* ICANON */ #endif -/* 7 ex-spare 1 */ #define VINTR 8 /* ISIG */ #define VQUIT 9 /* ISIG */ #define VSUSP 10 /* ISIG */ @@ -76,7 +75,7 @@ #define VTIME 17 /* !ICANON */ #ifndef _POSIX_SOURCE #define VSTATUS 18 /* ICANON together with IEXTEN */ -/* 19 spare 2 */ +#define VCHECKPT 19 /* ICANON together with IEXTEN */ #endif #define NCCS 20 diff --git a/sys/sys/ttydefaults.h b/sys/sys/ttydefaults.h index 7d16fd9fe9..e14cf772ee 100644 --- a/sys/sys/ttydefaults.h +++ b/sys/sys/ttydefaults.h @@ -37,7 +37,7 @@ * * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 * $FreeBSD: src/sys/sys/ttydefaults.h,v 1.13.2.1 2001/03/06 03:37:08 jkh Exp $ - * $DragonFly: src/sys/sys/ttydefaults.h,v 1.2 2003/06/17 04:28:59 dillon Exp $ + * $DragonFly: src/sys/sys/ttydefaults.h,v 1.3 2003/10/13 21:08:50 dillon Exp $ */ /* @@ -59,6 +59,7 @@ * Control Character Defaults */ #define CTRL(x) (x&037) +#define CCHECKPT CTRL('e') #define CEOF CTRL('d') #define CEOL 0xff /* XXX avoid _POSIX_VDISABLE */ #define CERASE 0177 -- 2.41.0