Problem
biwa does not install a handler for local SIGINT (Ctrl+C). The OS default terminates the client immediately, so the SSH session drops without telling the remote process to stop. Users expect Ctrl+C to interrupt the remote command (similar to OpenSSH), not only kill the local CLI.
Current behavior
- Ctrl+C delivers SIGINT to
biwa; the process exits with the usual shell convention (often exit code 130).
- The SSH connection is torn down abruptly; there is no application-level forwarding of the interrupt to the remote session.
Desired behavior
- While a remote command is running (especially with an interactive PTY / stdin forwarding), Ctrl+C should interrupt the remote process (or send the equivalent on the channel), not only exit the local client.
- Graceful shutdown of the local client can remain a separate concern (e.g. second Ctrl+C, or explicit disconnect), but the primary interrupt should reach the remote.
Notes / implementation sketch
- Likely requires handling
tokio::signal::ctrl_c() (or equivalent) and mapping it to SSH semantics: e.g. send an interrupt character on the PTY stream and/or a channel signal request, depending on session type and what russh supports.
- Must cover both PTY and non-PTY execution paths in
src/ssh/exec.rs (and related client code) where behavior may differ.
Related
Remote exit status mapping for SIGINT on the server side already exists in src/ssh/client/execute.rs (ExitSignal → synthetic 130); this issue is about local Ctrl+C reaching the remote, not interpreting remote exit signals.
Problem
biwadoes not install a handler for local SIGINT (Ctrl+C). The OS default terminates the client immediately, so the SSH session drops without telling the remote process to stop. Users expect Ctrl+C to interrupt the remote command (similar to OpenSSH), not only kill the local CLI.Current behavior
biwa; the process exits with the usual shell convention (often exit code 130).Desired behavior
Notes / implementation sketch
tokio::signal::ctrl_c()(or equivalent) and mapping it to SSH semantics: e.g. send an interrupt character on the PTY stream and/or a channel signal request, depending on session type and whatrusshsupports.src/ssh/exec.rs(and related client code) where behavior may differ.Related
Remote exit status mapping for
SIGINTon the server side already exists insrc/ssh/client/execute.rs(ExitSignal→ synthetic130); this issue is about local Ctrl+C reaching the remote, not interpreting remote exit signals.