mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01: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:
@@ -200,7 +200,7 @@ int Process::wait(const ProcessHandle& handle)
|
||||
}
|
||||
|
||||
|
||||
void Process::kill(const ProcessHandle& handle)
|
||||
void Process::kill(ProcessHandle& handle)
|
||||
{
|
||||
killImpl(*handle._pImpl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user