diff options
author | Zyad A. Ali <zyad.ali.me@gmail.com> | 2021-06-21 13:48:25 +0200 |
---|---|---|
committer | Zyad A. Ali <zyad.ali.me@gmail.com> | 2021-08-03 18:13:24 +0200 |
commit | eb638ee583ba29a879202451692fadfed7c3fdd0 (patch) | |
tree | 7f4ad90d8602d4d468d50019081fbf5368ebc38e /pkg/sentry/kernel | |
parent | 930984a1aa82caa21e87f4fb60dd457e61ab890b (diff) |
Implement stubs for msgsnd(2) and msgrcv(2).
Add support for msgsnd and msgrcv and enable syscall tests.
Updates #135
Diffstat (limited to 'pkg/sentry/kernel')
-rw-r--r-- | pkg/sentry/kernel/msgqueue/msgqueue.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/msgqueue/msgqueue.go b/pkg/sentry/kernel/msgqueue/msgqueue.go index 21025797d..28520b19a 100644 --- a/pkg/sentry/kernel/msgqueue/msgqueue.go +++ b/pkg/sentry/kernel/msgqueue/msgqueue.go @@ -386,6 +386,15 @@ func (q *Queue) pop(ctx context.Context, creds *auth.Credentials, mType int64, m return msg, nil } +// Copy copies a message from the queue without deleting it. See +// msgrcv(MSG_COPY). +func (q *Queue) Copy() (*Message, error) { + q.mu.Lock() + defer q.mu.Unlock() + + return nil, linuxerr.ENOSYS +} + // msgOfType returns the first message with the specified type, nil if no // message is found. If except is true, the first message of a type not equal // to mType will be returned. |