Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178391054
D62504.1796649796.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
788 B
Referenced Files
None
Subscribers
None
D62504.1796649796.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D62504: bhyve: make UART stdio backend preserve fd flags
Attached
Detach File
Event Timeline