pub async fn run_shell_io_loop_with_handle(
channel_id: ChannelId,
pty: Arc<RwLock<PtyMaster>>,
child: Option<Child>,
handle: Handle,
data_rx: Receiver<Vec<u8>>,
) -> i32Expand description
Run shell I/O loop using Handle for output (instead of ChannelStream).
This version spawns a separate task for PTY-to-SSH streaming, similar to how exec does it. handle.data() is called from the spawned task, not directly from the handler’s await chain.
§Arguments
channel_id- The SSH channel IDpty- The PTY master handlechild- The shell child process (optional)handle- The russh Handle for sending datadata_rx- Receiver for incoming data from SSH client
§Returns
Returns the exit code of the shell process.