|
|
coherent
msgctl() COHERENT System Call msgctl()
Message control operations
#include <sys/msg.h>
iinntt mmssggccttll(_m_s_q_i_d, _c_m_d, _b_u_f)
iinntt _m_s_q_i_d; iinntt _c_m_d; ssttrruucctt mmssqqiidd_ddss *_b_u_f;
msgctl performs the message-control operations specified by cmd.
The following cmds are available:
IIPPCC_SSTTAATT Place the current value of each member of the data
structure associated with msqid into the structure
pointed to by buf.
IIPPCC_SSEETT Set the value of the following members of the data
structure associated with msqid to the corresponding
value found in the structure pointed to by buf:
msg_perm.uid
msg_perm.gid
msg_perm.mode /* only low 9 bits */
msg_qbytes
This cmd can only be executed by a process that has an
effective-user identifier equal to either that of su-
peruser or to the value of msg_perm.uid in the data
structure associated with msqid. Only superuser can
raise the value of msg_qbytes.
IIPPCC_RRMMIIDD Remove the system identifier specified by msqid from
the system and destroy the message queue and data
structure associated with it. This cmd can only be ex-
ecuted by a process that has an effective-user iden-
tifier equal to either that of superuser or to the
value of msg_perm.uid in the data structure associated
with msqid.
msgctl fails if any of the following are true:
* msqid is not a valid message queue identifier. msgctl sets
the global variable errno to EINVAL.
* cmd is not a valid command (EEIINNVVAALL).
* cmd is equal to IPC_STAT and operation permission is denied to
the calling process (EEAACCCCEESS).
* cmd is equal to IPC_RMID or IPC_SET, and the effective-user
identifier of the calling process is not equal to that of su-
peruser and it is not equal to the value of msg_perm.uid in
the data structure associated with msqid (EEPPEERRMM).
* cmd is equal to IPC_SET, an attempt is being made to increase
to the value of msg_qbytes, and the effective-user identifier
of the calling process is not equal to that of super user
COHERENT Lexicon Page 1
msgctl() COHERENT System Call msgctl()
(EEPPEERRMM).
* buf points to an illegal address (EEFFAAUULLTT).
***** Return Value *****
Upon successful completion, msgctl returns zero. If a problem
occurs, it returns -1 and sets eerrrrnnoo to an appropriate value.
***** Files *****
/usr/include/sys/ipc.h
/usr/include/sys/msg.h
/dev/msg
***** See Also *****
COHERENT system calls, msg, msgget(), msgrcv(), msgsnd()
***** Notes *****
To improve portability, COHERENT implements the mmssgg functions as
a device driver rather than as an actual system call.
COHERENT Lexicon Page 2
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.