Syntax | #include <sys/msg.h> int msgget(key_t key, int msgflg); | |
Description |
Upon creation, the data structure associated with the new message queue identifier is initialized as follows:
| |
Return val. | Non-negative integer (message queue identifier) | |
if successful. | ||
-1 | if an error occurs. | |
Errors |
| |
|
| A message queue identifier exists for the argument key, but the access permissions specified by the low-order 9 bits of msgflg are not granted (see section “Interprocess communication”). |
|
| A message queue identifier exists for the argument key, but the value of |
|
| A message queue identifier exists for the argument key and |
|
| A message queue identifier is to be created, but the system-imposed limit on the maximum number of allowed message queue identifiers systemwide would be exceeded. |
Notes | The IEEE 1003.4 Standards Committee is developing alternative interfaces for interprocess communication. Application developers who need to use interprocess communication (IPC) should design their applications so that modules using the IPC routines described here can be easily modified at a later date. | |
See also |
|