Annotation of coherent/a/usr/man/COHERENT/msgget, revision 1.1.1.1

1.1       root        1: 
                      2: 
                      3: msgget()               COHERENT System Call              msgget()
                      4: 
                      5: 
                      6: 
                      7: 
                      8: Get message queue
                      9: 
                     10: #include <sys/msg.h>
                     11: mmssggggeett(_k_e_y, _m_s_g_f_l_g)
                     12: kkeeyy_tt _k_e_y; iinntt _m_s_g_f_l_g;
                     13: 
                     14: msgget returns the  message queue identifier associated with key,
                     15: should it exist.  If key has no message queue associated with it,
                     16: msgget checks  whether (_m_s_g_f_l_g  & IIPPCC_CCRREEAATT)  is true; if  it is,
                     17: then  msgget creates  a message  queue identifier  and associated
                     18: message queue and data structure for _k_e_y.
                     19: 
                     20: Upon creation, the data structure associated with the new message
                     21: queue identifier is initialized as follows:
                     22: 
                     23: *  msg_perm.cuid,  msg_perm.uid, msg_perm.cgid,  and msg_perm.gid
                     24:    are set  to, respectively,  the effective user  identifier and
                     25:    effective group identifier of the calling process.
                     26: 
                     27: *  The  low-order nine bits of msg_perm.mode are  set to the low-
                     28:    order nine bits of msgflg.  These nine bits define access per-
                     29:    missions: the  top three bits specify  the owner's access per-
                     30:    missions (read, write, execute), the middle three bits specify
                     31:    the owning group's  access permissions, and the low three bits
                     32:    specify access permissions for others.
                     33: 
                     34: *  msg_ctime is set to the current time.
                     35: 
                     36: *  msg_qbytes is set equal to the system limit, as defined by the
                     37:    kernel variable NMSQB.
                     38: 
                     39: msgget fails  if any of  the following is true.   The term within
                     40: parentheses  gives  the  value to  which  msgget  sets errno,  as
                     41: defined in the header file errno.h:
                     42: 
                     43: *  A  message queue identifier exists for  key but operation per-
                     44:    mission  as specified  by the  low-order  nine bits  of msgflg
                     45:    would not be granted (EEAACCCCEESS).
                     46: 
                     47: *  A message queue identifier  does not exist for key and (_m_s_g_f_l_g
                     48:    & IIPPCC_CCRREEAATT) is false (EENNOOEENNTT).
                     49: 
                     50: *  A message queue identifier is  to be created but the number of
                     51:    message queue identifiers system-wide exceeds the system limit
                     52:    as specified in the kernel variable NMSQID (EENNOOSSPPCC).
                     53: 
                     54: *   A message  queue identifier  exists for  key, but  ((_m_s_g_f_l_g &
                     55:    IIPPCC_CCRREEAATT) && (_m_s_g_f_l_g & IIPPCC_EEXXCCLL)) is true (EEEEXXIISSTT).
                     56: 
                     57: ***** Return Value *****
                     58: 
                     59: Upon  successful  completion,  msgget returns  the  message-queue
                     60: identifier, which  is always a  non-negative integer.  Otherwise,
                     61: it returns -1 and sets eerrrrnnoo to an appropriate value.
                     62: 
                     63: 
                     64: COHERENT Lexicon                                           Page 1
                     65: 
                     66: 
                     67: 
                     68: 
                     69: msgget()               COHERENT System Call              msgget()
                     70: 
                     71: 
                     72: 
                     73: 
                     74: ***** Files *****
                     75: 
                     76: /usr/include/sys/ipc.h
                     77: /usr/include/sys/msg.h
                     78: /dev/msg
                     79: 
                     80: ***** See Also *****
                     81: 
                     82: COHERENT system calls, msg, msgctl(), msgrcv(), msgsnd()
                     83: 
                     84: ***** Notes *****
                     85: 
                     86: To  improve  portability, the  mmssgg  functions  are presently  im-
                     87: plemented  as a  device driver  rather than  as an  actual system
                     88: call.
                     89: 
                     90: 
                     91: 
                     92: 
                     93: 
                     94: 
                     95: 
                     96: 
                     97: 
                     98: 
                     99: 
                    100: 
                    101: 
                    102: 
                    103: 
                    104: 
                    105: 
                    106: 
                    107: 
                    108: 
                    109: 
                    110: 
                    111: 
                    112: 
                    113: 
                    114: 
                    115: 
                    116: 
                    117: 
                    118: 
                    119: 
                    120: 
                    121: 
                    122: 
                    123: 
                    124: 
                    125: 
                    126: 
                    127: 
                    128: 
                    129: 
                    130: COHERENT Lexicon                                           Page 2
                    131: 
                    132: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.