summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/signalfd
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-10-10 19:57:04 +0000
committergVisor bot <gvisor-bot@google.com>2019-10-10 19:57:04 +0000
commitde6517c4c3b3dfb474ebd567c1c90330b869cbc2 (patch)
treec5ab80d8d7626e141118cda6bf19ca501c6e9a19 /pkg/sentry/kernel/signalfd
parent0e0abd3b24d23dbb16a357abdd2c64f63235784e (diff)
parentf8b18593198cf7ca1adfca19d846e66080b07942 (diff)
Merge release-20190806.1-259-gf8b1859 (automated)
Diffstat (limited to 'pkg/sentry/kernel/signalfd')
-rwxr-xr-xpkg/sentry/kernel/signalfd/signalfd.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/signalfd/signalfd.go b/pkg/sentry/kernel/signalfd/signalfd.go
index 06fd5ec88..4b08d7d72 100755
--- a/pkg/sentry/kernel/signalfd/signalfd.go
+++ b/pkg/sentry/kernel/signalfd/signalfd.go
@@ -121,7 +121,10 @@ func (s *SignalOperations) Read(ctx context.Context, _ *fs.File, dst usermem.IOS
// Readiness implements waiter.Waitable.Readiness.
func (s *SignalOperations) Readiness(mask waiter.EventMask) waiter.EventMask {
- return mask & waiter.EventIn
+ if mask&waiter.EventIn != 0 && s.target.PendingSignals()&s.Mask() != 0 {
+ return waiter.EventIn // Pending signals.
+ }
+ return 0
}
// EventRegister implements waiter.Waitable.EventRegister.