diff --git a/src/machine/machine.c b/src/machine/machine.c index 587c2267b6..7f5f48bd9b 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -804,8 +804,10 @@ int machine_start_shell( /* First try to get an fd for the PTY peer via the new racefree ioctl(), directly. Otherwise go via * joining the namespace, because it goes by path */ pty_fd = pty_open_peer_racefree(ptmx_fd, O_RDWR|O_NOCTTY|O_CLOEXEC); - if (ERRNO_IS_NEG_NOT_SUPPORTED(pty_fd)) + if (ERRNO_IS_NEG_NOT_SUPPORTED(pty_fd)) { + log_debug_errno(pty_fd, "Failed to get PTY peer via racefree ioctl() (ptmx_fd=%d). Trying via joining the namespace (ptmx_name=%s): %m", ptmx_fd, ptmx_name); pty_fd = machine_open_terminal(m, ptmx_name, O_RDWR|O_NOCTTY|O_CLOEXEC); + } if (pty_fd < 0) return log_debug_errno(pty_fd, "Failed to open terminal: %m");