summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2019-10-25 10:47:49 -0700
committergVisor bot <gvisor-bot@google.com>2019-10-25 11:19:20 -0700
commitfd598912bee1965c32dee1a5933678ed34e768bc (patch)
treeb7b9d21fea519f5ccc4ba44f9a0d218824ea1a25 /pkg
parent9a726745eec4de63ed427874e5ed58998a004689 (diff)
platform/ptrace: use tgkill instead of kill
The syscall filters don't allow kill, just tgkill. PiperOrigin-RevId: 276718421
Diffstat (limited to 'pkg')
-rw-r--r--pkg/sentry/platform/ptrace/subprocess.go3
1 files changed, 2 insertions, 1 deletions
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))
}