From 8f2c67241fc7eae6f44d7ea0e9fbe998b3977629 Mon Sep 17 00:00:00 2001 From: mpl Date: Fri, 21 Feb 2014 17:18:30 +0100 Subject: [PATCH] buildbot: send sigterm instead of sigkill to child Because if e.g. 'devcam test' is the current child process, we want it to be able to catch the signal and kill its own child too. Change-Id: I3e3c9c10c8d7f5d793c98b604baf8df56608003e --- misc/buildbot/builder/builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/buildbot/builder/builder.go b/misc/buildbot/builder/builder.go index d6545acb0..a18a88c48 100644 --- a/misc/buildbot/builder/builder.go +++ b/misc/buildbot/builder/builder.go @@ -210,8 +210,8 @@ func (t *task) run() (string, error) { t.Err = fmt.Sprintf("%v\n\nTask %q took too long. Giving up after %v seconds.\n", t.Err, t.String(), *taskLifespan) if cmd.Process != nil { - if err := cmd.Process.Kill(); err != nil { - dbg.Printf("Could not kill process for task %q: %v", t.String(), err) + if err := cmd.Process.Signal(syscall.SIGTERM); err != nil { + dbg.Printf("Could not terminate process for task %q: %v", t.String(), err) } } return "", t