Skip to content

Commit

Permalink
add comment for NumFDsWithContext
Browse files Browse the repository at this point in the history
  • Loading branch information
al-online committed Sep 23, 2024
1 parent cbc32af commit 462736c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions process/process_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,8 @@ func (p *Process) NumCtxSwitchesWithContext(ctx context.Context) (*NumCtxSwitche
return nil, common.ErrNotImplementedError
}

// NumFDsWithContext returns the number of handles for a process on Windows,
// not the number of file descriptors (FDs).
func (p *Process) NumFDsWithContext(ctx context.Context) (int32, error) {
handle, err := windows.OpenProcess(processQueryInformation, false, uint32(p.Pid))
if err != nil {
Expand Down

0 comments on commit 462736c

Please # to comment.