int msgget(key_t key, int msgflg);
When created, the data structure associated with the new message queue identifier is initialized in the following way:
- msg_perm.cuid, msg_perm.uid, msg_perm.cgid, and msg_perm.gid are set equal to the effective user ID and effective group ID, respectively, of the calling process.
- The permission bits of msg_perm.mode are set to the permission bits of msgflg.
- msg_qnum, msg_lspid, msg_lrpid, msg_stime, and msg_rtime are set to 0.
- msg_ctime is set to the current time.
- msg_qbytes is set to the system limit.
Specifies the message queue key for which to retrieve the msqid.
Is a flag that indicates specific message queue conditions and options to implement.
A message queue identifier exists for key, but operation permission as specified by permission bits of msgflg would not be granted.
A message queue identifier exists for key, but both (msgflg & IPC_CREAT) and (msgflg & IPC_EXCL) are both non-zero.
A message queue identifier does not exist for key and (msgflg & IPC_CREAT) is zero.
A message queue identifier is to be created, but the system-imposed limit on the maximum number of allowed message queue identifiers system wide would be exceeded.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.