Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2014 06:23:38 +0000 (UTC)
From:      Peter Grehan <grehan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262884 - head/usr.sbin/bhyve
Message-ID:  <201403070623.s276NcPf062573@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grehan
Date: Fri Mar  7 06:23:37 2014
New Revision: 262884
URL: http://svnweb.freebsd.org/changeset/base/262884

Log:
  Open the uart emulation's backing tty in non-blocking mode.
  This fixes the issue of bhyve appearing to halt when using
  nmdm ports for the console, until a connection is made to
  the other end.
  
  bhyveload already does this.
  
  Reported by:	Many.
  MFC after:	3 weeks.

Modified:
  head/usr.sbin/bhyve/uart_emul.c

Modified: head/usr.sbin/bhyve/uart_emul.c
==============================================================================
--- head/usr.sbin/bhyve/uart_emul.c	Fri Mar  7 02:41:45 2014	(r262883)
+++ head/usr.sbin/bhyve/uart_emul.c	Fri Mar  7 06:23:37 2014	(r262884)
@@ -585,7 +585,7 @@ uart_tty_backend(struct uart_softc *sc, 
 
 	retval = -1;
 
-	fd = open(opts, O_RDWR);
+	fd = open(opts, O_RDWR | O_NONBLOCK);
 	if (fd > 0 && isatty(fd)) {
 		sc->tty.fd = fd;
 		sc->tty.opened = true;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403070623.s276NcPf062573>