mirror of
https://github.com/danog/process.git
synced 2024-11-26 12:14:43 +01:00
Use taskkill on Windows
This commit is contained in:
parent
d2ffd35dbd
commit
37f75c10c4
@ -150,8 +150,8 @@ final class Runner implements ProcessRunner
|
||||
public function kill(ProcessHandle $handle)
|
||||
{
|
||||
/** @var Handle $handle */
|
||||
// todo: send a signal to the wrapper to kill the child instead?
|
||||
if (!\proc_terminate($handle->proc)) {
|
||||
\exec('taskkill /F /T /PID ' . $handle->wrapperPid . ' 2>&1', $output, $exitCode);
|
||||
if ($exitCode) {
|
||||
throw new ProcessException("Terminating process failed");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user