Go to the previous, next section.

msgctl

SYNOPSIS

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

PARAMETERS

msqid: [in] the message queue to manipulate.

cmd: [in] the operation to perform on the message queue.

buf: the interpretation of this parameter depends on cmd.

DESCRIPTION

Manipulates a message queue. cmd may be one of:

IPC_STAT
retreives some information on the queue.

IPC_SET
modify some operating parameters of the queue. buf points to a msqid_ds structure. The only modifiable parameters are: msg_perm.uid, msg_perm.gid, msg_perm.mode (only lowest 9 bits) and msg_qbytes. The calling task uid must be one of the creator uid or the owner uid of the queue or the superuser uid. Only the superuser may rise msg_qbytes beyond the system limit of MSGMNB.

IPC_RMID
immediately destroys the message queue and awake all sleaping reader and writer processes.

RETURN VALUE

On success zero is returned. On error -1 is returned and errno is set to one of the following values:

Go to the previous, next section.