Skip to content

Commit d1aada2

Browse files
committed
Use taskkill on Windows
1 parent a071f36 commit d1aada2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Context/FeatureContext.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,10 @@ public function afterScenario( AfterScenarioScope $scope ): void {
763763
* @param int $master_pid
764764
*/
765765
private static function terminate_proc( $master_pid ): void {
766+
if ( Utils\is_windows() ) {
767+
proc_close( proc_open( "taskkill /F /T /PID $master_pid", [], $pipes ) );
768+
return;
769+
}
766770

767771
$output = shell_exec( "ps -o ppid,pid,command | grep $master_pid" );
768772

0 commit comments

Comments
 (0)