ultimatepp/uppsrc/Core/SSH/Exec.cpp
2018-08-13 19:13:39 +00:00

16 lines
No EOL
323 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(!IsError() && PutGetEof() && Close() && WaitClose())
return GetExitCode();
}
return GetError();
}
}