Skip to content

Commit

Permalink
Merge pull request #1580 from jnewmano/patch-1
Browse files Browse the repository at this point in the history
Windows, read all PIDs if there are more than 1024 PIDs.
  • Loading branch information
shirou authored Jan 19, 2024
2 parents b86b36a + 15f7946 commit e912ebd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion process/process_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e912ebd

Please sign in to comment.