---
name: "msgread"
section: "1"
platform: "linux"
package: "selinux"
version: "2002031409-4"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/msgread"
---

# msgread(1)

reads the state of a message queue

## NAME

msgread - reads the state of a message queue

## SYNOPSIS

**msgread** *-i id* *-c context* *-s sid* *-t type*

## DESCRIPTION

**msgread** exercises the *msgrcv (2)* and *msgrcv\_secure (2)* system calls to retrieve a message from a message queue.

## OPTIONS

*-i* Message Queue ID.  The message queue ID is required. *-c* Security Context.  A security context may be given to request a message with a specific security context. *-s* Security ID.  A seccurity ID may be given to request a message with a specific security ID. *-t* Message Type. A message type may be given.  This is passed to the *msgrcv (2)* or *msgrcv\_secure (2)* system call and has the same semantics as the message type arguement to those calls.

## SEE ALSO

[**msgget**(1)](/msgget/1.md), [**msgsid**(1)](/msgsid/1.md), [**msgwrite**(1)](/msgwrite/1.md), [**msgperm**(1)](/msgperm/1.md), [**msgrcv**(2)](/msgrcv/2.md), [**msgrcv\_secure**(2)](/msgrcv_secure/2.md).
