mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-14 23:07:56 +02:00
Don't call CloseHandle() twice on Windows (as it causes crashes, or unexpected behavior). This would happen with the following test case:
ProcessHandle handle = Process.launch(...); handle.kill(); Then as handle gets out of scope, ~ProcessHandle would call CloseHandle() on an already closed handle.
This commit is contained in:
@@ -237,7 +237,7 @@ public:
|
||||
/// Waits for the process specified by handle to terminate
|
||||
/// and returns the exit code of the process.
|
||||
|
||||
static void kill(const ProcessHandle& handle);
|
||||
static void kill(ProcessHandle& handle);
|
||||
/// Kills the process specified by handle.
|
||||
///
|
||||
/// This is preferable on Windows where process IDs
|
||||
|
Reference in New Issue
Block a user