ultimatepp/uppsrc/Core/SSH/Exec.cpp
oblivion 89d8965e10 SSH: Standard channels (scp, exec, tunnel, shell) are all re-added. Minor bugfixes, cosmetics, cleanup. Docs updated.
git-svn-id: svn://ultimatepp.org/upp/trunk@12168 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2018-08-15 20:29:12 +00:00

16 lines
No EOL
311 B
C++

#include "SSH.h"
namespace Upp {
int SshExec::Execute(const String& cmd, String& out, String& err)
{
if(RequestExec(cmd)) {
int size = max(ssh->chunk_size, 1024);
out = Get(size);
err = GetStdErr(size);
if(Shut(IsError() ? GetErrorDesc() : Null))
return GetExitCode();
}
return GetError();
}
}