summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/msgqueue/msgqueue.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/kernel/msgqueue/msgqueue.go')
-rw-r--r--pkg/sentry/kernel/msgqueue/msgqueue.go9
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.