diff options
| author | pk <pk@NetBSD.org> | 1995-10-29 00:49:38 +0000 |
|---|---|---|
| committer | pk <pk@NetBSD.org> | 1995-10-29 00:49:38 +0000 |
| commit | 258108ce0f34db582ee702eb111ab38aebc670a4 (patch) | |
| tree | 2f698aa82432bdadb0be0f1b209617e4e79210c4 /usr.bin/tip/hunt.c | |
| parent | c0a156c9fd3a1fa1e55f82f6fe24b89f1b5f30cc (diff) | |
Convert to termios (from Scott Reynolds; PR#1621).
8-bit patches (from Matthieu Herrb; PR#1384).
Diffstat (limited to 'usr.bin/tip/hunt.c')
| -rw-r--r-- | usr.bin/tip/hunt.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/tip/hunt.c b/usr.bin/tip/hunt.c index 970b6a5d491..b490a7f7de2 100644 --- a/usr.bin/tip/hunt.c +++ b/usr.bin/tip/hunt.c @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.4 1994/12/24 17:56:27 cgd Exp $ */ +/* $NetBSD: hunt.c,v 1.5 1995/10/29 00:49:40 pk Exp $ */ /* * Copyright (c) 1983, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)hunt.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$NetBSD: hunt.c,v 1.4 1994/12/24 17:56:27 cgd Exp $"; +static char rcsid[] = "$NetBSD: hunt.c,v 1.5 1995/10/29 00:49:40 pk Exp $"; #endif /* not lint */ #include "tip.h" @@ -87,8 +87,12 @@ hunt(name) deadfl = 1; } if (!deadfl) { + struct termios cntrl; + + tcgetattr(FD, &cntrl); + cntrl.c_cflag |= HUPCL; + tcsetattr(FD, TCSAFLUSH, &cntrl); ioctl(FD, TIOCEXCL, 0); - ioctl(FD, TIOCHPCL, 0); signal(SIGALRM, SIG_DFL); return ((long)cp); } |
