summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-11-04 03:28:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-11-04 03:28:08 +0000
commit19e08d952f6fac2e1add94f2c61ddba0a1b67415 (patch)
tree678a2c9ca2b172c651ca1ab51eede1314f2eebcc /sys/kern
parente65a37b2b8d49f2245d001a1d0c0cf74effe428c (diff)
If VMIN=0, and timer>0 and expires, read should return 0
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/tty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 96f3c475b02..77f82a3e2a3 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.11 1996/10/19 13:26:01 mickey Exp $ */
+/* $OpenBSD: tty.c,v 1.12 1996/11/04 03:28:07 deraadt Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -1345,6 +1345,8 @@ sleep:
error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH,
carrier ? ttyin : ttopen, slp);
splx(s);
+ if (cc[VMIN] == 0 && error == EWOULDBLOCK)
+ return (0);
if (error && error != EWOULDBLOCK)
return (error);
goto loop;