Struct distant_core::RemoteProcess [−][src]
pub struct RemoteProcess {
pub stdin: Option<RemoteStdin>,
pub stdout: Option<RemoteStdout>,
pub stderr: Option<RemoteStderr>,
// some fields omitted
}
Expand description
Represents a process on a remote machine
Fields
stdin: Option<RemoteStdin>
Sender for stdin
stdout: Option<RemoteStdout>
Receiver for stdout
stderr: Option<RemoteStderr>
Receiver for stderr
Implementations
pub async fn spawn<T>(
tenant: String,
session: Session<T>,
cmd: String,
args: Vec<String>
) -> Result<Self, RemoteProcessError> where
T: DataStream + 'static,
pub async fn spawn<T>(
tenant: String,
session: Session<T>,
cmd: String,
args: Vec<String>
) -> Result<Self, RemoteProcessError> where
T: DataStream + 'static,
Spawns the specified process on the remote machine using the given session
Waits for the process to terminate, returning the success status and an optional exit code
Aborts the process by forcing its response task to shutdown, which means that a call
to wait
will return an error. Note that this does not send a kill request, so if
you want to be nice you should send the request before aborting.
Submits a kill request for the running process