CRITICAL: SSH terminal displays nothing - IO thread uses wrong PTY end #1

Closed
opened 2026-09-07 15:00:48 +00:00 by x3 · 0 comments
Owner

Bug

The IO thread was reading/writing pty_master_ instead of pty_slave_. Since VTE is connected to the master side, the IO thread must use the slave side to bridge SSH I/O. Remote output never reached the terminal.

Fix

// BEFORE (broken):
ssize_t n = read(self->pty_master_, buf, sizeof(buf));
write(self->pty_master_, buf, n);

// AFTER (fixed):
ssize_t n = read(slave_fd, buf, sizeof(buf));
if (write(slave_fd, buf, n) < 0 && errno != EINTR) break;

Status: Fixed in commit 4a2b2ea

## Bug The IO thread was reading/writing `pty_master_` instead of `pty_slave_`. Since VTE is connected to the master side, the IO thread must use the slave side to bridge SSH I/O. Remote output never reached the terminal. ## Fix ```cpp // BEFORE (broken): ssize_t n = read(self->pty_master_, buf, sizeof(buf)); write(self->pty_master_, buf, n); // AFTER (fixed): ssize_t n = read(slave_fd, buf, sizeof(buf)); if (write(slave_fd, buf, n) < 0 && errno != EINTR) break; ``` **Status:** Fixed in commit 4a2b2ea
x3 closed this issue 2026-09-07 16:58:14 +00:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: x3/x3-ssh#1