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
This commit is contained in:
mpl 2014-02-21 17:18:30 +01:00
parent 1333551de1
commit 8f2c67241f
1 changed files with 2 additions and 2 deletions

View File

@ -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