Merge pull request #521 from ZYecho/fix-check

fix check for timeout
This commit is contained in:
Kubernetes Prow Robot
2021-02-01 15:40:27 -08:00
committed by GitHub
+3
View File
@@ -175,6 +175,9 @@ func (p *Plugin) run(rule cpmtypes.CustomRule) (exitStatus cpmtypes.Status, outp
go func() {
select {
case <-ctx.Done():
if ctx.Err() == context.Canceled {
return
}
glog.Errorf("Error in running plugin timeout %q", rule.Path)
if cmd.Process == nil || cmd.Process.Pid == 0 {
glog.Errorf("Error in cmd.Process check %q", rule.Path)