From 873043aeab23d61813d4b405225a2737fadd3cfd Mon Sep 17 00:00:00 2001 From: grehan Date: Fri, 7 Mar 2014 06:23:37 +0000 Subject: 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. --- usr.sbin/bhyve/uart_emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/bhyve') diff --git a/usr.sbin/bhyve/uart_emul.c b/usr.sbin/bhyve/uart_emul.c index 2fbbd15..dd1c220 100644 --- a/usr.sbin/bhyve/uart_emul.c +++ b/usr.sbin/bhyve/uart_emul.c @@ -585,7 +585,7 @@ uart_tty_backend(struct uart_softc *sc, const char *opts) 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; -- cgit v1.1