You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Only setup serial device if input is a terminal/FIFO
Currently, whenever firecracker starts with a daemonized jailer, it
prints the following warning: "Failed to register serial input fd:
event_manager: failed to manage epoll file descriptor: Operation not
permitted (os error 1)". This is because if the jailer daemonizes the
firecracker process, it will redirect stdin to /dev/null. However, when
trying to register FILENO_STDIN to epoll via epoll_ctl, it will return
EPERM if such a redirection has happened. However, if the jailer is
daemonized, then this will result in the correct behavior, because we do
not _want_ a serial device here.
The changes in this commit make firecracker only try to initialize the
serial device if FILENO_STDIN is a terminal (as reported by isatty(3))
or a FIFO pipe (as reported by fstat). This fixes the incorrect
warnings.
Signed-off-by: Patrick Roy <[email protected]>
# Should be significantly more than before the `cat` command.
221
221
assertlast_count-init_count>10000
222
+
223
+
224
+
REGISTER_FAILED_WARNING="Failed to register serial input fd: event_manager: failed to manage epoll file descriptor: Operation not permitted (os error 1)"
0 commit comments