_sysvipc Module Documentation

This module provides a thin wrapper around the Linux library functions msgget, msgsnd, msgrcv, and msgctl.

The module _sysvipc exports the following constants and functions:

msgget(key, msgflg)

Returns the message queue identifier associated with the value of the key argument. A new message queue is created if
a) the key value is IPC_PRIVATE, or
b) no message queue with the given key value exists, and IPC_CREAT is asserted in msgflg.
Upon creation, the low 9 bits of msgflg contain mode bits to allow access to the queue.

msgsnd(msqid, text, msgtyp, msgflg)

Sends a message on the associated message queue.

msgrcv(msqid, msgsz, msgtyp, msgflg)

Returns a string containing the message sent by a previous msgsnd call.

msgctl_rmid(msqid)

Removes the associated message queue from the system.

msgctl_set(msqid, value_dict)

Uses values in value_dict to set data fields for the associated message queue.

msgctl_stat(msqid)

Returns a dictionary containing controlling data for the associated message queue.

IPC_CREAT
IPC_EXCL

Flag bits for msgget.

MSG_EXCEPT
MSG_NOERROR
IPC_NOWAIT

Flag bits for msgsnd and msgrcv.

IPC_PRIVATE

Special key value used in msgget calls to ???

S_IRUSR
S_IWUSR
S_IREAD
S_IWRITE
S_IRGRP
S_IWGRP
S_IROTH
S_IWOTH

Specify permission modes in msgflg in calls to msgget.