mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 02:53:10 +01:00
add is_running support
This commit is contained in:
@@ -217,6 +217,15 @@ public:
|
||||
/// Waits for the process specified by handle to terminate
|
||||
/// and returns the exit code of the process.
|
||||
|
||||
static bool isRunning(const ProcessHandle& handle);
|
||||
/// check if the process specified by handle is running or not
|
||||
///
|
||||
/// This is preferable on Windows where process IDs
|
||||
/// may be reused.
|
||||
|
||||
static bool isRunning(PID pid);
|
||||
/// Check if the process specified by given pid is running or not.
|
||||
|
||||
static void kill(ProcessHandle& handle);
|
||||
/// Kills the process specified by handle.
|
||||
///
|
||||
|
||||
@@ -66,6 +66,8 @@ public:
|
||||
const EnvImpl& env);
|
||||
static void killImpl(ProcessHandleImpl& handle);
|
||||
static void killImpl(PIDImpl pid);
|
||||
static bool isRunningImpl(const ProcessHandleImpl& handle);
|
||||
static bool isRunningImpl(PIDImpl pid);
|
||||
static void requestTerminationImpl(PIDImpl pid);
|
||||
|
||||
private:
|
||||
|
||||
@@ -67,6 +67,8 @@ public:
|
||||
static int waitImpl(PIDImpl pid);
|
||||
static void killImpl(ProcessHandleImpl& handle);
|
||||
static void killImpl(PIDImpl pid);
|
||||
static bool isRunningImpl(const ProcessHandleImpl& handle);
|
||||
static bool isRunningImpl(PIDImpl pid);
|
||||
static void requestTerminationImpl(PIDImpl pid);
|
||||
};
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ public:
|
||||
const EnvImpl& env);
|
||||
static void killImpl(ProcessHandleImpl& handle);
|
||||
static void killImpl(PIDImpl pid);
|
||||
static bool isRunningImpl(const ProcessHandleImpl& handle);
|
||||
static bool isRunningImpl(PIDImpl pid);
|
||||
static void requestTerminationImpl(PIDImpl pid);
|
||||
};
|
||||
|
||||
|
||||
@@ -72,6 +72,8 @@ public:
|
||||
const EnvImpl& env);
|
||||
static void killImpl(ProcessHandleImpl& handle);
|
||||
static void killImpl(PIDImpl pid);
|
||||
static bool isRunningImpl(const ProcessHandleImpl& handle);
|
||||
static bool isRunningImpl(PIDImpl pid);
|
||||
static void requestTerminationImpl(PIDImpl pid);
|
||||
static std::string terminationEventName(PIDImpl pid);
|
||||
};
|
||||
|
||||
@@ -72,6 +72,8 @@ public:
|
||||
const EnvImpl& env);
|
||||
static void killImpl(ProcessHandleImpl& handle);
|
||||
static void killImpl(PIDImpl pid);
|
||||
static bool isRunningImpl(const ProcessHandleImpl& handle);
|
||||
static bool isRunningImpl(PIDImpl pid);
|
||||
static void requestTerminationImpl(PIDImpl pid);
|
||||
static std::string terminationEventName(PIDImpl pid);
|
||||
};
|
||||
|
||||
@@ -72,6 +72,8 @@ public:
|
||||
const EnvImpl& env);
|
||||
static void killImpl(ProcessHandleImpl& handle);
|
||||
static void killImpl(PIDImpl pid);
|
||||
static bool isRunningImpl(const ProcessHandleImpl& handle);
|
||||
static bool isRunningImpl(PIDImpl pid);
|
||||
static void requestTerminationImpl(PIDImpl pid);
|
||||
static std::string terminationEventName(PIDImpl pid);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user