We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
process_impl::Session::subsystem
1 parent f40dd09 commit 7d1232cCopy full SHA for 7d1232c
src/process_impl/session.rs
@@ -81,6 +81,18 @@ impl Session {
81
Command::new(cmd)
82
}
83
84
+ pub(crate) fn subsystem<S: AsRef<OsStr>>(&self, program: S) -> Command {
85
+ // XXX: Should we do a self.check() here first?
86
+
87
+ // NOTE: we pass -p 9 nine here (the "discard" port) to ensure that ssh does not
88
+ // succeed in establishing a _new_ connection if the master connection has failed.
89
90
+ let mut cmd = self.new_cmd(&["-T", "-p", "9", "-s"]);
91
+ cmd.arg("--").arg(program);
92
93
+ Command::new(cmd)
94
+ }
95
96
pub(crate) async fn request_port_forward(
97
&self,
98
forward_type: impl Into<ForwardType>,
0 commit comments