=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/tty.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/mail/tty.c 1997/07/31 17:55:16 1.9 --- src/usr.bin/mail/tty.c 1997/11/13 03:30:21 1.10 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.9 1997/07/31 17:55:16 millert Exp $ */ /* $NetBSD: tty.c,v 1.7 1997/07/09 05:25:46 mikel Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.10 1997/11/13 03:30:21 millert Exp $ */ /* $NetBSD: tty.c,v 1.7 1997/07/09 05:25:46 mikel Exp $ */ /* *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)tty.c 8.2 (Berkeley) 4/20/95"; #else ! static char rcsid[] = "$OpenBSD: tty.c,v 1.9 1997/07/31 17:55:16 millert Exp $"; #endif #endif /* not lint */ --- 38,44 ---- #if 0 static char sccsid[] = "@(#)tty.c 8.2 (Berkeley) 4/20/95"; #else ! static char rcsid[] = "$OpenBSD: tty.c,v 1.10 1997/11/13 03:30:21 millert Exp $"; #endif #endif /* not lint */ *************** *** 73,78 **** --- 73,82 ---- sig_t saveint; #ifndef TIOCSTI sig_t savequit; + #else + # ifdef TIOCEXT + int extproc, flag; + #endif /* TIOCEXT */ #endif sig_t savetstp; sig_t savettou; *************** *** 105,110 **** --- 109,122 ---- if ((savequit = signal(SIGQUIT, SIG_IGN)) == SIG_DFL) (void)signal(SIGQUIT, SIG_DFL); #else + # ifdef TIOCEXT + extproc = ((ttybuf.c_lflag & EXTPROC) ? 1 : 0); + if (extproc) { + flag = 0; + if (ioctl(fileno(stdin), TIOCEXT, &flag) < 0) + warn("TIOCEXT: off"); + } + # endif /* TIOCEXT */ if (sigsetjmp(intjmp, 1)) { errs = SIGINT; goto out; *************** *** 152,157 **** --- 164,177 ---- if (ttyset) tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf); (void)signal(SIGQUIT, savequit); + #else + # ifdef TIOCEXT + if (extproc) { + flag = 1; + if (ioctl(fileno(stdin), TIOCEXT, &flag) < 0) + warn("TIOCEXT: on"); + } + # endif /* TIOCEXT */ #endif (void)signal(SIGINT, saveint); return(errs);