Skip to content
BSD syscall#258

svc · unix #258

msgctl

Performs control operations on a System V message queue (stat, set, remove).

Prototype

int msgctl(int msqid, int cmd, struct msqid_ds *buf);

Returns: int

Arguments

NameTypeDirDescription
msqidint-
cmdint-
bufstruct msqid_ds-

Version history

XNU tagmacOS#
xnu-1456.1.26macOS 10.6 Snow Leopard258
xnu-1486.2.11—258
xnu-1504.15.3—258
xnu-1504.3.12—258
xnu-1504.7.4—258
xnu-1504.9.17—258
xnu-1504.9.26—258
xnu-1504.9.37—258

Notes

Supports IPC_STAT, IPC_SET and IPC_RMID. On macOS the System V IPC subsystem is gated by the kern.sysv.* sysctls and is rarely used by first-party software, which prefers Mach ports or XPC. Sandboxed processes typically have IPC_CREAT denied outright.

Related APIs

msggetmsgsndmsgrcvipcsipcrm