summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/task.go
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2018-09-14 11:09:41 -0700
committerShentubot <shentubot@google.com>2018-09-14 11:10:50 -0700
commit0380bcb3a4125723dc5248f70174ff64fb1942a2 (patch)
tree9f9b9afc0add292aa7d0014062dd3786bb025632 /pkg/sentry/kernel/task.go
parentfaa34a0738456f5328cf99de13622a150042776d (diff)
Fix interaction between rt_sigtimedwait and ignored signals.
PiperOrigin-RevId: 213011782 Change-Id: I716c6ea3c586b0c6c5a892b6390d2d11478bc5af
Diffstat (limited to 'pkg/sentry/kernel/task.go')
-rw-r--r--pkg/sentry/kernel/task.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/sentry/kernel/task.go b/pkg/sentry/kernel/task.go
index ae4fd7817..2f6f825ac 100644
--- a/pkg/sentry/kernel/task.go
+++ b/pkg/sentry/kernel/task.go
@@ -108,9 +108,12 @@ type Task struct {
// goroutine.
signalMask linux.SignalSet
- // FIXME: An equivalent to task_struct::real_blocked is needed
- // to prevent signals that are ignored, but transiently unblocked by
- // sigtimedwait(2), from being dropped in Task.sendSignalTimerLocked.
+ // If the task goroutine is currently executing Task.sigtimedwait,
+ // realSignalMask is the previous value of signalMask, which has temporarily
+ // been replaced by Task.sigtimedwait. Otherwise, realSignalMask is 0.
+ //
+ // realSignalMask is exclusive to the task goroutine.
+ realSignalMask linux.SignalSet
// If haveSavedSignalMask is true, savedSignalMask is the signal mask that
// should be applied after the task has either delivered one signal to a