Class | Net::SSH::Service::Shell::SyncShell |
In: |
lib/net/ssh/service/shell/sync.rb
|
Parent: | Object |
A version of Shell::Shell that acts synchronously, allowing clients to execute a command via a shell, wait for it to finish, and then inspect both the stdout and stderr from the command, as well as the exit status.
CommandOutput | = | Struct.new( :stdout, :stderr, :status ) | A struct representing the result of executing a command. | |
CONFIRMATION | = | "2357foobarbazzabraboof7532" | The unique confirmation string that is used to recognize the end of a command’s execution. |
Create a new SyncShell that uses the given shell factory to obtain a shell to wrap. The other parameters are used
Reinterprets missing methods as requests to execute commands. The parameters to the method are concatenated together with spaces and sent to the shell via send_command.
Attempts to invoke the given command, which must not be terminated with a newline. If stdin is not nil, it will be sent to the shell immediately after sending the request to execute the command. It is expected that this will be used by the program that was just executed somehow, but this is not (cannot) be enforced.