mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 02:18:04 +01:00
GH #2689: Added tryWait() into Process and ProcessHandle. Handle kill()-ed UNIX process exit codes.
This commit is contained in:
@@ -36,10 +36,11 @@ class Foundation_API ProcessHandleImpl: public RefCountedObject
|
||||
public:
|
||||
ProcessHandleImpl(pid_t pid);
|
||||
~ProcessHandleImpl();
|
||||
|
||||
|
||||
pid_t id() const;
|
||||
int wait() const;
|
||||
|
||||
int tryWait() const;
|
||||
|
||||
private:
|
||||
pid_t _pid;
|
||||
};
|
||||
@@ -51,15 +52,15 @@ public:
|
||||
typedef pid_t PIDImpl;
|
||||
typedef std::vector<std::string> ArgsImpl;
|
||||
typedef std::map<std::string, std::string> EnvImpl;
|
||||
|
||||
|
||||
static PIDImpl idImpl();
|
||||
static void timesImpl(long& userTime, long& kernelTime);
|
||||
static ProcessHandleImpl* launchImpl(
|
||||
const std::string& command,
|
||||
const ArgsImpl& args,
|
||||
const std::string& command,
|
||||
const ArgsImpl& args,
|
||||
const std::string& initialDirectory,
|
||||
Pipe* inPipe,
|
||||
Pipe* outPipe,
|
||||
Pipe* inPipe,
|
||||
Pipe* outPipe,
|
||||
Pipe* errPipe,
|
||||
const EnvImpl& env);
|
||||
static void killImpl(ProcessHandleImpl& handle);
|
||||
@@ -70,11 +71,11 @@ public:
|
||||
|
||||
private:
|
||||
static ProcessHandleImpl* launchByForkExecImpl(
|
||||
const std::string& command,
|
||||
const ArgsImpl& args,
|
||||
const std::string& command,
|
||||
const ArgsImpl& args,
|
||||
const std::string& initialDirectory,
|
||||
Pipe* inPipe,
|
||||
Pipe* outPipe,
|
||||
Pipe* inPipe,
|
||||
Pipe* outPipe,
|
||||
Pipe* errPipe,
|
||||
const EnvImpl& env);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user