Skip to content

Commit 5b3a23a

Browse files
committed
Update process operator
1 parent fa92bdd commit 5b3a23a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/watcher/process/process_operator.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ func (pw *ProcessOperator) Processes(ctx context.Context) (
8585
}
8686

8787
func (pw *ProcessOperator) Process(ctx context.Context, pid int32) (*nginxprocess.Process, error) {
88-
return nginxprocess.Find(ctx, pid, nginxprocess.WithStatus(true))
88+
proc, err := process.NewProcessWithContext(ctx, pid)
89+
if err != nil {
90+
return nil, err
91+
}
92+
93+
return convertProcess(ctx, proc), nil
8994
}
9095

9196
func convertProcess(ctx context.Context, proc *process.Process) *nginxprocess.Process {

0 commit comments

Comments
 (0)