ultimatepp/archive/uppsrc/Web/sproc.h
cxl 5b610cc0e6 upp.src: reorganize (TCore... moved to archive)
git-svn-id: svn://ultimatepp.org/upp/trunk@14426 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-05-03 08:26:26 +00:00

21 lines
708 B
C++

class SlaveProcess
{
public:
SlaveProcess() {}
virtual ~SlaveProcess() {}
virtual void Kill() = 0;
virtual bool IsRunning() = 0;
virtual void Write(String s) = 0;
virtual bool Read(String& s) = 0;
virtual int GetExitCode() = 0;
virtual void Detach() {};
private:
SlaveProcess(const SlaveProcess& sp);
void operator = (const SlaveProcess& sp);
};
One<SlaveProcess> StartLocalProcess(const char *cmdline, const char *envptr = NULL);
One<SlaveProcess> StartRemoteProcess(const char *host, int port, const char *cmdline, const char *envptr = NULL, int timeout = Null);
One<SlaveProcess> StartProcess(const char *cmdline, const char *envptr = NULL, int timeout = Null);