summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/ptrace
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-08-17 00:42:24 +0000
committergVisor bot <gvisor-bot@google.com>2019-08-17 00:42:24 +0000
commite2b43d815e1e98b93c578058832a52a6aa117ce0 (patch)
treee50460ef42521e7a7bd3c3e7156e30610b8f2bdf /pkg/sentry/platform/ptrace
parent2c2fb24a621e341cfca57a8755561ebc705c92b1 (diff)
parent2a1303357c3d928cca95601241fc16baca0e5f41 (diff)
Merge 2a130335 (automated)
Diffstat (limited to 'pkg/sentry/platform/ptrace')
-rw-r--r--pkg/sentry/platform/ptrace/subprocess.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/platform/ptrace/subprocess.go b/pkg/sentry/platform/ptrace/subprocess.go
index 79501682d..6bf7cd097 100644
--- a/pkg/sentry/platform/ptrace/subprocess.go
+++ b/pkg/sentry/platform/ptrace/subprocess.go
@@ -354,6 +354,9 @@ func (t *thread) wait(outcome waitOutcome) syscall.Signal {
continue // Spurious stop.
}
if stopSig == syscall.SIGTRAP {
+ if status.TrapCause() == syscall.PTRACE_EVENT_EXIT {
+ t.dumpAndPanic("wait failed: the process exited")
+ }
// Re-encode the trap cause the way it's expected.
return stopSig | syscall.Signal(status.TrapCause()<<8)
}