]> Cypherpunks repositories - gostls13.git/commit
testenv: kill subprocess if SIGQUIT doesn't do it
authorAustin Clements <austin@google.com>
Thu, 9 Dec 2021 17:51:29 +0000 (12:51 -0500)
committerAustin Clements <austin@google.com>
Sun, 12 Dec 2021 14:36:20 +0000 (14:36 +0000)
commitcc795a01dcec7c97044b31571af88ac98310f2b3
tree38ebc425147dfb096079cd4acdb01fdf1a9a0702
parent6b8977372263504535cad6e880ffca156bdfdf68
testenv: kill subprocess if SIGQUIT doesn't do it

This makes testenv.RunWithTimeout first attempt to SIGQUIT the
subprocess to get a useful Go traceback, but if that doesn't work, it
sends a SIGKILL instead to make sure we tear down the subprocess. This
is potentially important for non-Go subprocesses.

For #37405.

Change-Id: I9e7e118dc5769ec3f45288a71658733bff30c9cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/370702
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/internal/testenv/testenv.go