summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/kernel.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2018-06-21 14:53:05 -0700
committerShentubot <shentubot@google.com>2018-06-21 14:53:55 -0700
commit2dedbc7211fb6b7f8b86148e6627054e781eaa87 (patch)
tree75ecc27e664f6dcf82c0833cd66b639aa1797b42 /pkg/sentry/kernel/kernel.go
parentf6be5fe6193163ad46722bc36209572da4a15ad0 (diff)
Drop return from SendExternalSignal
SendExternalSignal is no longer called before CreateProcess, so it can enforce this simplified precondition. StartForwarding, and after Kernel.Start. PiperOrigin-RevId: 201591170 Change-Id: Ib7022ef7895612d7d82a00942ab59fa433c4d6e9
Diffstat (limited to 'pkg/sentry/kernel/kernel.go')
-rw-r--r--pkg/sentry/kernel/kernel.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/pkg/sentry/kernel/kernel.go b/pkg/sentry/kernel/kernel.go
index a17148af1..5662b8f08 100644
--- a/pkg/sentry/kernel/kernel.go
+++ b/pkg/sentry/kernel/kernel.go
@@ -760,12 +760,11 @@ func (k *Kernel) Unpause() {
//
// context is used only for debugging to describe how the signal was received.
//
-// Returns false if signal could not be sent because the Kernel is not fully
-// initialized yet.
-func (k *Kernel) SendExternalSignal(info *arch.SignalInfo, context string) bool {
+// Preconditions: Kernel must have an init process.
+func (k *Kernel) SendExternalSignal(info *arch.SignalInfo, context string) {
k.extMu.Lock()
defer k.extMu.Unlock()
- return k.sendExternalSignal(info, context)
+ k.sendExternalSignal(info, context)
}
// FeatureSet returns the FeatureSet.