From 19b815a6450935920a2a474c366c7ab1fb030a0e Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 25 Sep 1994 03:59:03 +0000 Subject: [PATCH] If you used tip to start SLIP, tip would fail to write to the tty after slattach was started. Now tip knows to die when it gets ENODEV... --- usr.bin/tip/tip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/tip/tip.c b/usr.bin/tip/tip.c index 1f3d499157d4..1745faa57ba0 100644 --- a/usr.bin/tip/tip.c +++ b/usr.bin/tip/tip.c @@ -558,6 +558,8 @@ pwrite(fd, buf, n) if (write(fd, buf, n) < 0) { if (errno == EIO) tipabort("Lost carrier."); + if (errno == ENODEV) + tipabort("tty not available."); /* this is questionable */ perror("write"); }