You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnUnknown, fmt.Errorf("OpenProcess failed for pid=%v: %w", pid, err)
}
deferfunc() {
_=syscall.CloseHandle(handle)
}()
varexitCodeuint32
err=syscall.GetExitCodeProcess(handle, &exitCode)
iferr!=nil {
returnUnknown, fmt.Errorf("GetExitCodeProcess failed for pid=%v: %w", pid, err)
}
ifexitCode==259 { //still active
returnRunning, nil
}
returnSleeping, nil
}
The Win32 GetExitCodeProcess Function doesn't directly return if a process is suspended. For Windows, to see if a process is suspended we would have to check all of the process threads and make sure those are suspended. This may require using the non-stable wininternal api.
The text was updated successfully, but these errors were encountered:
elastic-agent-system-metrics/metric/system/process/process_windows.go
Lines 192 to 211 in e28f1d3
The Win32 GetExitCodeProcess Function doesn't directly return if a process is suspended. For Windows, to see if a process is suspended we would have to check all of the process threads and make sure those are suspended. This may require using the non-stable wininternal api.
The text was updated successfully, but these errors were encountered: