From 662d0b8c515af474b5c51cb59a190f150426c4bd Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 6 Oct 1995 15:32:36 +0000 Subject: [PATCH] Die if we get errors from the tty. --- usr.bin/tip/tip/tipout.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.bin/tip/tip/tipout.c b/usr.bin/tip/tip/tipout.c index 246cfb7d67f..4d6b56524c2 100644 --- a/usr.bin/tip/tip/tipout.c +++ b/usr.bin/tip/tip/tipout.c @@ -141,9 +141,11 @@ tipout() sigblock(sigmask(SIGTERM)); intTERM(); /*NOTREACHED*/ - } else { - printf("%d %d\r",cnt,errno); - fflush(stdout); + } else if (cnt < 0) { + kill(getppid(),SIGUSR1); + sigblock(sigmask(SIGTERM)); + intTERM(); + /*NOTREACHED*/ } continue; }