Page MenuHomeFreeBSD

D62504.1796649796.diff
No OneTemporary

Authored By
Unknown
Size
788 B
Referenced Files
None
Subscribers
None

D62504.1796649796.diff

diff --git a/usr.sbin/bhyve/uart_backend.c b/usr.sbin/bhyve/uart_backend.c
--- a/usr.sbin/bhyve/uart_backend.c
+++ b/usr.sbin/bhyve/uart_backend.c
@@ -348,6 +348,7 @@
static int
uart_stdio_backend(struct uart_softc *sc)
{
+ int flags;
#ifndef WITHOUT_CAPSICUM
cap_rights_t rights;
cap_ioctl_t cmds[] = { TIOCGETA, TIOCSETA, TIOCGWINSZ };
@@ -360,9 +361,11 @@
sc->tty.wfd = STDOUT_FILENO;
sc->tty.opened = true;
- if (fcntl(sc->tty.rfd, F_SETFL, O_NONBLOCK) != 0)
+ flags = fcntl(sc->tty.rfd, F_GETFL);
+ if (fcntl(sc->tty.rfd, F_SETFL, flags | O_NONBLOCK) != 0)
return (-1);
- if (fcntl(sc->tty.wfd, F_SETFL, O_NONBLOCK) != 0)
+ flags = fcntl(sc->tty.wfd, F_GETFL);
+ if (fcntl(sc->tty.wfd, F_SETFL, flags | O_NONBLOCK) != 0)
return (-1);
#ifndef WITHOUT_CAPSICUM

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 7, 1:23 PM (16 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42261944
Default Alt Text
D62504.1796649796.diff (788 B)

Event Timeline