mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01:00
GH #2689: Added tryWait() into Process and ProcessHandle. Handle kill()-ed UNIX process exit codes.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include "Poco/Foundation.h"
|
||||
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#if defined(_WIN32_WCE)
|
||||
#include "Process_WINCE.h"
|
||||
#else
|
||||
@@ -66,6 +66,11 @@ public:
|
||||
/// Waits for the process to terminate
|
||||
/// and returns the exit code of the process.
|
||||
|
||||
int tryWait() const;
|
||||
/// Checks that process is terminated
|
||||
/// and returns the exit code of the process.
|
||||
/// If the process is still running, returns -1.
|
||||
|
||||
protected:
|
||||
ProcessHandle(ProcessHandleImpl* pImpl);
|
||||
|
||||
@@ -211,6 +216,10 @@ public:
|
||||
/// Waits for the process specified by handle to terminate
|
||||
/// and returns the exit code of the process.
|
||||
|
||||
static int tryWait(const ProcessHandle& handle);
|
||||
/// Checks that process is finished and returns the exit code of the
|
||||
/// process. If the process is still running, returns -1.
|
||||
|
||||
static bool isRunning(const ProcessHandle& handle);
|
||||
/// check if the process specified by handle is running or not
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user