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

# msgwrite(1)

writes a message to a message queue

## NAME

msgwrite - writes a message to a message queue

## SYNOPSIS

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

## DESCRIPTION

**msgwrite** exercises the *msgsnd (2)* and *msgsnd\_secure (2)* system calls to send a message to 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 the message be sent with a specific security context. *-s* Security ID.  A seccurity ID may be given to request the message be sent with a specific security ID. *-t* Message Type. A message type may be given.  This is passed to the *msgsnd (2)* or *msgsnd\_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), [**msgread**(1)](/man/msgread/1.md), [**msgperm**(1)](/man/msgperm/1.md), [**msgsnd**(2)](/man/msgsnd/2.md), [**msgsnd\_secure**(2)](/man/msgsnd_secure/2.md).
