diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-10-10 19:57:04 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-10-10 19:57:04 +0000 |
commit | de6517c4c3b3dfb474ebd567c1c90330b869cbc2 (patch) | |
tree | c5ab80d8d7626e141118cda6bf19ca501c6e9a19 /pkg/sentry/kernel/signalfd/signalfd.go | |
parent | 0e0abd3b24d23dbb16a357abdd2c64f63235784e (diff) | |
parent | f8b18593198cf7ca1adfca19d846e66080b07942 (diff) |
Merge release-20190806.1-259-gf8b1859 (automated)
Diffstat (limited to 'pkg/sentry/kernel/signalfd/signalfd.go')
-rwxr-xr-x | pkg/sentry/kernel/signalfd/signalfd.go | 5 |
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. |