diff options
-rw-r--r-- | usr.bin/tip/tipout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tip/tipout.c b/usr.bin/tip/tipout.c index a37e675a4b7..0ebe017276e 100644 --- a/usr.bin/tip/tipout.c +++ b/usr.bin/tip/tipout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tipout.c,v 1.17 2006/03/17 19:42:47 deraadt Exp $ */ +/* $OpenBSD: tipout.c,v 1.18 2006/05/31 07:03:08 jason Exp $ */ /* $NetBSD: tipout.c,v 1.5 1996/12/29 10:34:12 cgd Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)tipout.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = "$OpenBSD: tipout.c,v 1.17 2006/03/17 19:42:47 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: tipout.c,v 1.18 2006/05/31 07:03:08 jason Exp $"; #endif /* not lint */ #include "tip.h" @@ -145,7 +145,7 @@ tipout(void) scnt = read(FD, buf, BUFSIZ); if (scnt <= 0) { /* lost carrier */ - if (scnt < 0 && errno == EIO) { + if (scnt == 0 || (scnt < 0 && errno == EIO)) { sigemptyset(&mask); sigaddset(&mask, SIGTERM); sigprocmask(SIG_BLOCK, &mask, NULL); |