---
name: "msgread"
section: "1"
platform: "linux"
package: "selinux"
version: "2002031409-4"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://carta.tech/man/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)](/man/msgget/1.md), [**msgsid**(1)](/man/msgsid/1.md), [**msgwrite**(1)](/man/msgwrite/1.md), [**msgperm**(1)](/man/msgperm/1.md), [**msgrcv**(2)](/man/msgrcv/2.md), [**msgrcv\_secure**(2)](/man/msgrcv_secure/2.md).
