diff options
author | Lennart Poettering <lennart@poettering.net> | 2025-01-14 12:05:05 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2025-01-15 10:39:04 +0100 |
commit | 1d522f1a866f911980b5eaad87182bf58c58fa32 (patch) | |
tree | b93260e04145dce08a9a1fb7a3719a5eb30e00e6 /src/machine | |
parent | update TODO (diff) | |
download | systemd-1d522f1a866f911980b5eaad87182bf58c58fa32.tar.xz systemd-1d522f1a866f911980b5eaad87182bf58c58fa32.zip |
terminal-util: drop support for pre-TIOCGPTPEER kernels
Our minimum baseline is now far beyond 4.13, hence let's drop these
fallback paths.
Diffstat (limited to 'src/machine')
-rw-r--r-- | src/machine/machine.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c index 70714c30b4..3bb7a94ddd 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -805,13 +805,7 @@ int machine_start_shell( if (!p || !utmp_id) return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Path of pseudo TTY has unexpected prefix"); - /* 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)) { - 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); - } + pty_fd = pty_open_peer(ptmx_fd, O_RDWR|O_NOCTTY|O_CLOEXEC); if (pty_fd < 0) return log_debug_errno(pty_fd, "Failed to open terminal: %m"); |