File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ type Process struct {
2828}
2929
3030// IsWorker returns true if the process is a NGINX worker process.
31- func (p * Process ) IsWorker () bool { return strings .HasPrefix (p .Cmd , "nginx: worker" ) }
31+ func (p * Process ) IsWorker () bool {
32+ return strings .HasPrefix (p .Cmd , "nginx: worker" ) ||
33+ strings .HasPrefix (p .Cmd , "{nginx-debug} nginx: worker" )
34+ }
3235
3336// IsMaster returns true if the process is a NGINX master process.
3437func (p * Process ) IsMaster () bool {
Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ func TestProcess_IsNginxWorker(t *testing.T) {
5555 cmd : "nginx: cache manager process" ,
5656 want : false ,
5757 },
58+ "Test 5 nginx debug" : {
59+ cmd : "{nginx-debug} nginx: worker process" ,
60+ want : true ,
61+ },
5862 }
5963 for name , tc := range testcases {
6064 t .Run (name , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments