summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-11-04 03:28:07 +0000
committerderaadt <deraadt@openbsd.org>1996-11-04 03:28:07 +0000
commitab7e447bda450a848ae1be8ab04e387b268f5c27 (patch)
treed85801e103f6eb0c20d32c67610b93ef37154006 /sys/kern/tty.c
parentRedo access time change; it should be updated on a read of 0 bytes when (diff)
downloadwireguard-openbsd-ab7e447bda450a848ae1be8ab04e387b268f5c27.tar.xz
wireguard-openbsd-ab7e447bda450a848ae1be8ab04e387b268f5c27.zip
If VMIN=0, and timer>0 and expires, read should return 0
Diffstat (limited to 'sys/kern/tty.c')
-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;