machine: add debugging info to trace #35115
This commit is contained in:
committed by
Luca Boccassi
parent
8567f1342b
commit
544b7718b3
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user