Merge pull request #1580 from jnewmano/patch-1

Windows, read all PIDs if there are more than 1024 PIDs.
pull/1587/head
shirou 1 year ago committed by GitHub
commit e912ebde7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -253,7 +253,7 @@ func pidsWithContext(ctx context.Context) ([]int32, error) {
if err := windows.EnumProcesses(ps, &read); err != nil {
return nil, err
}
if uint32(len(ps)) == read { // ps buffer was too small to host every results, retry with a bigger one
if uint32(len(ps)) == read/dwordSize { // ps buffer was too small to host every results, retry with a bigger one
psSize += 1024
continue
}

Loading…
Cancel
Save