We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 815e7b9 commit d73535dCopy full SHA for d73535d
src/AsyncTaskStatus.php
@@ -189,8 +189,8 @@ private function observeTaskRunnerProcess(): bool
189
// since we should have remembered the PID, we can just query whether it still exists
190
// supposedly, the PID has not rolled over yet, right...?
191
if (OsInfo::isWindows()) {
192
- // Windows uses GCIM to discover processes
193
- $echoedPid = exec("powershell echo \"\"(gcim Win32_Process -Filter \\\"ProcessId = {$this->lastKnownPID}\\\").ProcessId\"\"");
+ // Windows can also use Get-Process to probe processes
+ $echoedPid = exec("powershell (Get-Process -id {$this->lastKnownPID}).Id");
194
if ($echoedPid === false) {
195
throw new RuntimeException(self::MSG_CANNOT_CHECK_STATUS);
196
}
0 commit comments