Resume the child process first

This commit is contained in:
Jared Miller 2026-01-30 07:46:41 -05:00
parent d5194ede9e
commit 766ae27fee
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -147,12 +147,16 @@ async function main() {
}
process.stdin.resume();
if (pty) {
// Resume child process
// Resume child process first
process.kill(pty.pid, "SIGCONT");
// Trigger PTY redraw by sending resize + Ctrl+L
const { cols, rows } = getTerminalSize();
pty.resize(cols, rows);
pty.write("\x0c"); // Ctrl+L forces TUI redraw
// Give child time to wake up, then trigger redraw
setTimeout(() => {
if (pty && !isExiting) {
const { cols, rows } = getTerminalSize();
pty.resize(cols, rows);
process.kill(pty.pid, "SIGWINCH"); // Tell child window changed
}
}, 50);
}
});