summaryrefslogtreecommitdiffstats
path: root/usr.bin/tip
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-09-25 03:59:03 +0000
committerphk <phk@FreeBSD.org>1994-09-25 03:59:03 +0000
commit1cd6a2cee1e2a2db37473283ec2f1514efc5ec89 (patch)
treec991b2779d59914ab8fdc74a529f4e34cf207c33 /usr.bin/tip
parent9dddbea941d6c4828ba4dcbc15a4109d6639c911 (diff)
downloadFreeBSD-src-1cd6a2cee1e2a2db37473283ec2f1514efc5ec89.zip
FreeBSD-src-1cd6a2cee1e2a2db37473283ec2f1514efc5ec89.tar.gz
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...
Diffstat (limited to 'usr.bin/tip')
-rw-r--r--usr.bin/tip/tip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/tip/tip.c b/usr.bin/tip/tip.c
index 1f3d499..1745faa 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");
}
OpenPOWER on IntegriCloud