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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to