Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions host/host_aix_nocgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ package host
import (
"context"

"github.com/shirou/gopsutil/v4/internal/common"
"github.com/shirou/gopsutil/v4/process"
)

func numProcs(_ context.Context) (uint64, error) {
return 0, common.ErrNotImplementedError
func numProcs(ctx context.Context) (uint64, error) {
procs, err := process.PidsWithContext(ctx)
if err != nil {
return 0, err
}
return uint64(len(procs)), nil
}
5 changes: 5 additions & 0 deletions process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,11 @@ func (p *Process) Terminal() (string, error) {
return p.TerminalWithContext(context.Background())
}

// SignalsPending returns the signals pending for the process.
func (p *Process) SignalsPending() (SignalInfoStat, error) {
return p.SignalsPendingWithContext(context.Background())
}

// Nice returns a nice value (priority).
func (p *Process) Nice() (int32, error) {
return p.NiceWithContext(context.Background())
Expand Down
Loading
Loading