This patch is against the 2.6.34 source.
Paraphrased from the 1989 BSD patch by David Borman @ cray.com:
     These are the changes needed for the kernel to support
     LINEMODE in the server.
     There is a new bit in the termios local flag word, EXTPROC.
     When this bit is set, several aspects of the terminal driver
     are disabled.  Input line editing, character echo, and mapping
     of signals are all disabled.  This allows the telnetd to turn
     off these functions when in linemode, but still keep track of
     what state the user wants the terminal to be in.
     New ioctl:
         TIOCSIG         Generate a signal to processes in the
                         current process group of the pty.
     There is a new mode for packet driver, the TIOCPKT_IOCTL bit.
     When packet mode is turned on in the pty, and the EXTPROC bit
     is set, then whenever the state of the pty is changed, the
     next read on the master side of the pty will have the TIOCPKT_IOCTL
     bit set.  This allows the process on the server side of the pty
     to know when the state of the terminal has changed; it can then
     issue the appropriate ioctl to retrieve the new state.
Since the original BSD patches accompanied the source code for telnet
I've left that reference here, but obviously the feature is useful for
any remote terminal protocol, including ssh.
The corresponding feature has existed in the BSD tty driver since 1989.
For historical reference, a good copy of the relevant files can be found
here:
http://anonsvn.mit.edu/viewvc/krb5/trunk/src/appl/telnet/?pathrev=17741
Signed-off-by: Howard Chu <hyc@symas.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
 # define TIOCPKT_START          8
 # define TIOCPKT_NOSTOP                16
 # define TIOCPKT_DOSTOP                32
+# define TIOCPKT_IOCTL         64
 
 
 #define TIOCNOTTY      0x5422
 #define TIOCGSID       0x5429  /* Return the session ID of FD */
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define TIOCSERCONFIG  0x5453
 #define TIOCSERGWILD   0x5454
 
 #define FLUSHO 0x00800000
 #define PENDIN 0x20000000
 #define IEXTEN 0x00000400
+#define EXTPROC        0x10000000
 
 /* Values for the ACTION argument to `tcflow'.  */
 #define        TCOOFF          0
 
 #define TCSETSF2       _IOW('T',0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define TIOCGRS485      0x542E
 #define TIOCSRS485      0x542F
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT   0x01    /* Transmitter physically empty */
 
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 /* tcflow() and TCXONC use these */
 #define        TCOOFF          0
 
 #define TCSETSF2       _IOW('T',0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define TIOCGRS485      0x542E
 #define TIOCSRS485      0x542F
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 /* tcflow() and TCXONC use these */
 #define        TCOOFF          0
 
 #define TCSETSF2       _IOW('T',0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define FIONCLEX       0x5450  /* these numbers need to be adjusted. */
 #define FIOCLEX                0x5451
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 /* tcflow() and TCXONC use these */
 #define        TCOOFF          0
 
 #define TCSETSF2       _IOW('T',0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define FIONCLEX       0x5450  /* these numbers need to be adjusted. */
 #define FIOCLEX                0x5451
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 
 /* tcflow() and TCXONC use these */
 
 #define TCSETSF2       _IOW('T',0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define FIONCLEX       0x5450  /* these numbers need to be adjusted. */
 #define FIOCLEX                0x5451
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 
 /* tcflow() and TCXONC use these */
 
 #define TCSETSF2       _IOW('T',0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define FIONCLEX       0x5450  /* these numbers need to be adjusted. */
 #define FIOCLEX                0x5451
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 /* tcflow() and TCXONC use these */
 #define        TCOOFF          0
 
 #define TCSETSF2       _IOW('T',0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define FIONCLEX       0x5450
 #define FIOCLEX                0x5451
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 /* tcflow() and TCXONC use these */
 #define        TCOOFF          0
 
 #define TCSETSF2       _IOW('T',0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define FIONCLEX       0x5450  /* these numbers need to be adjusted. */
 #define FIOCLEX                0x5451
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 
 /* tcflow() and TCXONC use these */
 
 #define         TIOCPKT_START          0x08    /* start output */
 #define         TIOCPKT_NOSTOP         0x10    /* no more ^S, ^Q */
 #define         TIOCPKT_DOSTOP         0x20    /* now do ^S ^Q */
-/* #define  TIOCPKT_IOCTL              0x40    state change of pty driver */
+#define  TIOCPKT_IOCTL         0x40    /* state change of pty driver */
 #define TIOCSWINSZ     _IOW('t', 103, struct winsize)  /* set window size */
 #define TIOCGWINSZ     _IOR('t', 104, struct winsize)  /* get window size */
 #define TIOCNOTTY      0x5471          /* void tty association */
 #define TCSETSF2       _IOW('T', 0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T', 0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T', 0x36, int)  /* Generate signal on Pty slave */
 
 /* I hope the range from 0x5480 on is free ... */
 #define TIOCSCTTY      0x5480          /* become controlling tty */
 
 #define PENDIN 0040000         /* Retype pending input (state).  */
 #define TOSTOP 0100000         /* Send SIGTTOU for background output.  */
 #define ITOSTOP        TOSTOP
+#define EXTPROC        0200000         /* External processing on pty */
 
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 #define TIOCGPTN       _IOR('T', 0x30, unsigned int) /* Get Pty Number
                                                       * (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T', 0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T', 0x36, int)  /* Generate signal on Pty slave */
 
 #define FIONCLEX       0x5450
 #define FIOCLEX                0x5451
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 /* tcflow() and TCXONC use these */
 #define        TCOOFF          0
 
 #define TCSETSF2       _IOW('T',0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define FIONCLEX       0x5450  /* these numbers need to be adjusted. */
 #define FIOCLEX                0x5451
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 
 #define FLUSHO  0010000
 #define PENDIN  0040000
 #define IEXTEN  0100000
+#define EXTPROC        0200000
 
 /* tcflow() and TCXONC use these */
 #define        TCOOFF          0
 
 # define TIOCPKT_START          8
 # define TIOCPKT_NOSTOP                16
 # define TIOCPKT_DOSTOP                32
+# define TIOCPKT_IOCTL         64
 
 
 #define TIOCNOTTY      0x5422
 #define TIOCSRS485     0x542f
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define TIOCSERCONFIG  0x5453
 #define TIOCSERGWILD   0x5454
 
 #define FLUSHO 0x00800000
 #define PENDIN 0x20000000
 #define IEXTEN 0x00000400
+#define EXTPROC        0x10000000
 
 /* Values for the ACTION argument to `tcflow'.  */
 #define        TCOOFF          0
 
 #define TCSETSF2       _IOW('T',0x2D, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define FIONCLEX       0x5450  /* these numbers need to be adjusted. */
 #define FIOCLEX                0x5451
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
 
 
 # define TIOCPKT_START          8
 # define TIOCPKT_NOSTOP                16
 # define TIOCPKT_DOSTOP                32
+# define TIOCPKT_IOCTL         64
 
 
 #define TIOCNOTTY      _IO('T', 34) /* 0x5422 */
 #define TCSETSF2       _IOW('T', 45, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define TIOCSERCONFIG  _IO('T', 83) /* 0x5453 */
 #define TIOCSERGWILD   _IOR('T', 84,  int) /* 0x5454 */
 
 /* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */
 #define TIOCGPTN       _IOR('t', 134, unsigned int) /* Get Pty Number */
 #define TIOCSPTLCK     _IOW('t', 135, int) /* Lock/unlock PTY */
+#define TIOCSIG                _IOW('t', 136, int) /* Generate signal on Pty slave */
 
 /* Little f */
 #define FIOCLEX                _IO('f', 1)
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #endif /* !(_ASM_SPARC_IOCTLS_H) */
 
 #define FLUSHO 0x00002000
 #define PENDIN 0x00004000
 #define IEXTEN 0x00008000
+#define EXTPROC        0x00010000
 
 /* modem lines */
 #define TIOCM_LE       0x001
 
 # define TIOCPKT_START          8
 # define TIOCPKT_NOSTOP                16
 # define TIOCPKT_DOSTOP                32
+# define TIOCPKT_IOCTL         64
 
 
 #define TIOCNOTTY      _IO('T', 34)
 #define TCSETSF2       _IOW('T', 45, struct termios2)
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
+#define TIOCSIG                _IOW('T',0x36, int)  /* Generate signal on Pty slave */
 
 #define TIOCSERCONFIG  _IO('T', 83)
 #define TIOCSERGWILD   _IOR('T', 84,  int)
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 /* tcflow() and TCXONC use these */
 
 
        if (I_IUCLC(tty) && L_IEXTEN(tty))
                c = tolower(c);
 
+       if (L_EXTPROC(tty)) {
+               put_tty_queue(c, tty);
+               return;
+       }
+
        if (tty->stopped && !tty->flow_stopped && I_IXON(tty) &&
            I_IXANY(tty) && c != START_CHAR(tty) && c != STOP_CHAR(tty) &&
            c != INTR_CHAR(tty) && c != QUIT_CHAR(tty) && c != SUSP_CHAR(tty)) {
 
        n_tty_set_room(tty);
 
-       if (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) {
+       if ((!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) ||
+               L_EXTPROC(tty)) {
                kill_fasync(&tty->fasync, SIGIO, POLL_IN);
                if (waitqueue_active(&tty->read_wait))
                        wake_up_interruptible(&tty->read_wait);
 static inline int input_available_p(struct tty_struct *tty, int amt)
 {
        tty_flush_to_ldisc(tty);
-       if (tty->icanon) {
+       if (tty->icanon && !L_EXTPROC(tty)) {
                if (tty->canon_data)
                        return 1;
        } else if (tty->read_cnt >= (amt ? amt : 1))
                spin_lock_irqsave(&tty->read_lock, flags);
                tty->read_tail = (tty->read_tail + n) & (N_TTY_BUF_SIZE-1);
                tty->read_cnt -= n;
+               /* Turn single EOF into zero-length read */
+               if (L_EXTPROC(tty) && tty->icanon && n == 1) {
+                       if (!tty->read_cnt && (*b)[n-1] == EOF_CHAR(tty))
+                               n--;
+               }
                spin_unlock_irqrestore(&tty->read_lock, flags);
                *b += n;
                *nr -= n;
                        nr--;
                }
 
-               if (tty->icanon) {
+               if (tty->icanon && !L_EXTPROC(tty)) {
                        /* N.B. avoid overrun if nr == 0 */
                        while (nr && tty->read_cnt) {
                                int eol;
 
        return 0;
 }
 
+/* Send a signal to the slave */
+static int pty_signal(struct tty_struct *tty, int sig)
+{
+       unsigned long flags;
+       struct pid *pgrp;
+
+       if (tty->link) {
+               spin_lock_irqsave(&tty->link->ctrl_lock, flags);
+               pgrp = get_pid(tty->link->pgrp);
+               spin_unlock_irqrestore(&tty->link->ctrl_lock, flags);
+
+               kill_pgrp(pgrp, sig, 1);
+               put_pid(pgrp);
+       }
+       return 0;
+}
+
 static void pty_flush_buffer(struct tty_struct *tty)
 {
        struct tty_struct *to = tty->link;
        switch (cmd) {
        case TIOCSPTLCK: /* Set PT Lock (disallow slave open) */
                return pty_set_lock(tty, (int __user *) arg);
+       case TIOCSIG:    /* Send signal to other side of pty */
+               return pty_signal(tty, (int) arg);
        }
        return -ENOIOCTLCMD;
 }
                return pty_set_lock(tty, (int __user *)arg);
        case TIOCGPTN: /* Get PT Number */
                return put_user(tty->index, (unsigned int __user *)arg);
+       case TIOCSIG:    /* Send signal to other side of pty */
+               return pty_signal(tty, (int) arg);
        }
 
        return -ENOIOCTLCMD;
 
 
        /* See if packet mode change of state. */
        if (tty->link && tty->link->packet) {
+               int extproc = (old_termios.c_lflag & EXTPROC) |
+                               (tty->termios->c_lflag & EXTPROC);
                int old_flow = ((old_termios.c_iflag & IXON) &&
                                (old_termios.c_cc[VSTOP] == '\023') &&
                                (old_termios.c_cc[VSTART] == '\021'));
                int new_flow = (I_IXON(tty) &&
                                STOP_CHAR(tty) == '\023' &&
                                START_CHAR(tty) == '\021');
-               if (old_flow != new_flow) {
+               if ((old_flow != new_flow) || extproc) {
                        spin_lock_irqsave(&tty->ctrl_lock, flags);
-                       tty->ctrl_status &= ~(TIOCPKT_DOSTOP | TIOCPKT_NOSTOP);
-                       if (new_flow)
-                               tty->ctrl_status |= TIOCPKT_DOSTOP;
-                       else
-                               tty->ctrl_status |= TIOCPKT_NOSTOP;
+                       if (old_flow != new_flow) {
+                               tty->ctrl_status &= ~(TIOCPKT_DOSTOP | TIOCPKT_NOSTOP);
+                               if (new_flow)
+                                       tty->ctrl_status |= TIOCPKT_DOSTOP;
+                               else
+                                       tty->ctrl_status |= TIOCPKT_NOSTOP;
+                       }
+                       if (extproc)
+                               tty->ctrl_status |= TIOCPKT_IOCTL;
                        spin_unlock_irqrestore(&tty->ctrl_lock, flags);
                        wake_up_interruptible(&tty->link->read_wait);
                }
 
 COMPATIBLE_IOCTL(TIOCGPTN)
 COMPATIBLE_IOCTL(TIOCSPTLCK)
 COMPATIBLE_IOCTL(TIOCSERGETLSR)
+COMPATIBLE_IOCTL(TIOCSIG)
 #ifdef TCGETS2
 COMPATIBLE_IOCTL(TCGETS2)
 COMPATIBLE_IOCTL(TCSETS2)
 
 #define TCSETX         0x5433
 #define TCSETXF                0x5434
 #define TCSETXW                0x5435
+#define TIOCSIG                _IOW('T', 0x36, int)  /* pty: generate signal */
 
 #define FIONCLEX       0x5450
 #define FIOCLEX                0x5451
 #define TIOCPKT_START           8
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
+#define TIOCPKT_IOCTL          64
 
 #define TIOCSER_TEMT   0x01    /* Transmitter physically empty */
 
 
 #define FLUSHO 0010000
 #define PENDIN 0040000
 #define IEXTEN 0100000
+#define EXTPROC        0200000
 
 /* tcflow() and TCXONC use these */
 #define        TCOOFF          0
 
 #define L_FLUSHO(tty)  _L_FLAG((tty), FLUSHO)
 #define L_PENDIN(tty)  _L_FLAG((tty), PENDIN)
 #define L_IEXTEN(tty)  _L_FLAG((tty), IEXTEN)
+#define L_EXTPROC(tty) _L_FLAG((tty), EXTPROC)
 
 struct device;
 struct signal_struct;