mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-24 13:48:56 +08:00
Merge pull request #1580 from jnewmano/patch-1
Windows, read all PIDs if there are more than 1024 PIDs.
This commit is contained in:
commit
e912ebde7a
@ -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…
x
Reference in New Issue
Block a user