Skip to content

Commit

Permalink
fix: comments in pkg/chaosdaemon/util.GetChildProcesses (chaos-mesh#4377
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zhanluxianshen authored Mar 19, 2024
1 parent 1a15e4f commit 28d1370
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/chaosdaemon/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ func ReadCommName(pid int) (string, error) {
}

// GetChildProcesses will return all child processes's pid. Include all generations.
// only return error when /proc/pid/tasks cannot be read
// Only return error when `/proc` cannot be read.
func GetChildProcesses(ppid uint32, logger logr.Logger) ([]uint32, error) {
procs, err := os.ReadDir(bpm.DefaultProcPrefix)
if err != nil {
return nil, errors.Wrapf(err, "read /proc/pid/tasks , ppid : %d", ppid)
return nil, errors.Wrapf(err, "read /proc")
}

type processPair struct {
Expand Down

0 comments on commit 28d1370

Please sign in to comment.