svn commit: r262884 - head/usr.sbin/bhyve

Peter Grehan grehan at FreeBSD.org
Fri Mar 7 06:23:38 UTC 2014


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;


More information about the svn-src-head mailing list