summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/task_signals.go
diff options
context:
space:
mode:
authorDean Deng <deandeng@google.com>2020-08-18 19:26:55 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-18 19:28:53 -0700
commitf2822da54293aaf1c161bde62dcfddfc234e4394 (patch)
treed983846a99f38882c48d8e433572e3bb10b8fe99 /pkg/sentry/kernel/task_signals.go
parent9da77d00fa682ff504c7ff549985f78b0574c79b (diff)
Move ERESTART* error definitions to syserror package.
This is needed to avoid circular dependencies between the vfs and kernel packages. PiperOrigin-RevId: 327355524
Diffstat (limited to 'pkg/sentry/kernel/task_signals.go')
-rw-r--r--pkg/sentry/kernel/task_signals.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/sentry/kernel/task_signals.go b/pkg/sentry/kernel/task_signals.go
index cff2a8365..d6a2040bc 100644
--- a/pkg/sentry/kernel/task_signals.go
+++ b/pkg/sentry/kernel/task_signals.go
@@ -159,7 +159,7 @@ func (t *Task) deliverSignal(info *arch.SignalInfo, act arch.SignalAct) taskRunS
sigact := computeAction(linux.Signal(info.Signo), act)
if t.haveSyscallReturn {
- if sre, ok := SyscallRestartErrnoFromReturn(t.Arch().Return()); ok {
+ if sre, ok := syserror.SyscallRestartErrnoFromReturn(t.Arch().Return()); ok {
// Signals that are ignored, cause a thread group stop, or
// terminate the thread group do not interact with interrupted
// syscalls; in Linux terms, they are never returned to the signal
@@ -168,11 +168,11 @@ func (t *Task) deliverSignal(info *arch.SignalInfo, act arch.SignalAct) taskRunS
// signal that is actually handled (by userspace).
if sigact == SignalActionHandler {
switch {
- case sre == ERESTARTNOHAND:
+ case sre == syserror.ERESTARTNOHAND:
fallthrough
- case sre == ERESTART_RESTARTBLOCK:
+ case sre == syserror.ERESTART_RESTARTBLOCK:
fallthrough
- case (sre == ERESTARTSYS && !act.IsRestart()):
+ case (sre == syserror.ERESTARTSYS && !act.IsRestart()):
t.Debugf("Not restarting syscall %d after errno %d: interrupted by signal %d", t.Arch().SyscallNo(), sre, info.Signo)
t.Arch().SetReturn(uintptr(-ExtractErrno(syserror.EINTR, -1)))
default: