Skip to content
Merged
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
5 changes: 4 additions & 1 deletion pkg/nginxprocess/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ type Process struct {
}

// IsWorker returns true if the process is a NGINX worker process.
func (p *Process) IsWorker() bool { return strings.HasPrefix(p.Cmd, "nginx: worker") }
func (p *Process) IsWorker() bool {
return strings.HasPrefix(p.Cmd, "nginx: worker") ||
strings.HasPrefix(p.Cmd, "{nginx-debug} nginx: worker")
}

// IsMaster returns true if the process is a NGINX master process.
func (p *Process) IsMaster() bool {
Expand Down
4 changes: 4 additions & 0 deletions pkg/nginxprocess/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ func TestProcess_IsNginxWorker(t *testing.T) {
cmd: "nginx: cache manager process",
want: false,
},
"Test 5 nginx debug": {
cmd: "{nginx-debug} nginx: worker process",
want: true,
},
}
for name, tc := range testcases {
t.Run(name, func(t *testing.T) {
Expand Down