From fd598912bee1965c32dee1a5933678ed34e768bc Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Fri, 25 Oct 2019 10:47:49 -0700 Subject: platform/ptrace: use tgkill instead of kill The syscall filters don't allow kill, just tgkill. PiperOrigin-RevId: 276718421 --- pkg/sentry/platform/ptrace/subprocess.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/sentry') diff --git a/pkg/sentry/platform/ptrace/subprocess.go b/pkg/sentry/platform/ptrace/subprocess.go index b699b057d..ddb1f41e3 100644 --- a/pkg/sentry/platform/ptrace/subprocess.go +++ b/pkg/sentry/platform/ptrace/subprocess.go @@ -335,7 +335,8 @@ func (t *thread) unexpectedStubExit() { // these cases, we don't need to panic. There is no reasons to // think that something wrong in gVisor. log.Warningf("The ptrace stub process %v has been killed by SIGKILL.", t.tgid) - syscall.Kill(os.Getpid(), syscall.SIGKILL) + pid := os.Getpid() + syscall.Tgkill(pid, pid, syscall.Signal(syscall.SIGKILL)) } t.dumpAndPanic(fmt.Sprintf("wait failed: the process %d:%d exited: %x (err %v)", t.tgid, t.tid, msg, err)) } -- cgit v1.2.3