Module Name:    src
Committed By:   gson
Date:           Tue Aug 25 12:55:30 UTC 2015

Modified Files:
        src/sys/kern: tty.c

Log Message:
In ttywait_timo(), break out of loop on all errors, not just
EWOULDBLOCK, as ttywait() did prior to 1.265.


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 src/sys/kern/tty.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/tty.c
diff -u src/sys/kern/tty.c:1.266 src/sys/kern/tty.c:1.267
--- src/sys/kern/tty.c:1.266	Mon Aug 24 22:50:32 2015
+++ src/sys/kern/tty.c	Tue Aug 25 12:55:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.266 2015/08/24 22:50:32 pooka Exp $	*/
+/*	$NetBSD: tty.c,v 1.267 2015/08/25 12:55:30 gson Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.266 2015/08/24 22:50:32 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.267 2015/08/25 12:55:30 gson Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1552,10 +1552,10 @@ ttywait_timo(struct tty *tp, int timo)
 	    CONNECTED(tp) && tp->t_oproc) {
 		(*tp->t_oproc)(tp);
 		error = ttysleep(tp, &tp->t_outcv, true, timo);
-		if (error == EWOULDBLOCK) {
+		if (error == EWOULDBLOCK)
 			ttyflush(tp, FWRITE);
+		if (error)
 			break;
-		}
 	}
 	mutex_spin_exit(&tty_lock);
 

Reply via email to