msgget man page on Xenix

Man page or keyword search:  
man Server   1130 pages
apropos Keyword Search (all sections)
Output format
Xenix logo
[printable version]



     MSGGET(S)		      XENIX System V		     MSGGET(S)

     Name
	  msgget - Gets message queue.

     Syntax
	  #include <sys/types.h>
	  #include <sys/ipc.h>
	  #include <sys/msg.h>

	  int msgget (key, msgflg)
	  key_t key;
	  int msgflg;

     Description
	  msgget returns the message queue identifier associated with
	  key.

	  A message queue identifier, an associated message queue, and
	  data structure (see intro(S)) are created for key if one of
	  the following is true:

	       key is equal to IPC_PRIVATE .

	       key does not already have a message queue identifier
	       associated with it, and (msgflg & IPC_CREAT ) is
	       ``true''.

	  Values for the data structure associated with the new
	  message queue identifier are initialized as follows:

	       msg_perm.cuid and msg_perm.uid are set equal to the
	       effective user ID of the calling process.
	       msg_perm.cgid and msg_perm.gid are set equal to the
	       effective group ID of the calling process.

	       The low-order 9 bits of msg_perm.mode are set equal to
	       the low-order 9 bits of msgflg.

	       msg_qnum,msg_lspid,msg_lrpid, and msg_rtime are set
	       equal to 0.

	       msg_ctime is set equal to the current time.

	       msg_qbytes is set equal to the system limit.

	  msgget fails if one or more of the following is true:

	       A message queue identifier exists for key; however,
	       operation permission as specified by the low-order 9
	       bits of msgflg would not be granted (see intro(S)).
	       [EACCES]

	       A message queue identifier does not exist for key and

     Page 1					      (printed 8/7/87)

     MSGGET(S)		      XENIX System V		     MSGGET(S)

	       (msgflg & IPC_CREAT ) is ``false''.  [ENOENT]

	       A message queue identifier would be created but the
	       system-imposed limit on the maximum number of allowed
	       message queue identifiers for the system would be
	       exceeded.  [ENOSPC]

	       A message queue identifier exists for the key but (
	       (msgflg & IPC_CREAT ) & (msgflg && IPC_EXCL ) ) is
	       ``true''.  [EEXIST]

     Return Value
	  Upon successful completion, the message queue identifier is
	  returned.  This is a non-negative integer.  Otherwise, a
	  value of -1 is returned and errno is set to indicate the
	  error.

     See Also
	  intro(S), msgctl(S), msgop(S).

     Notes
	  Programs using this function must be compiled with the -Me
	  compiler option.

     Page 2					      (printed 8/7/87)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net