


     msgget(XPG4.os/ipcRelease 4.4.1 (The Open Groumsgget(XPG4.os/ipc)



     NAME
	  XPG4.os/ipc/msgget - get message queue identifier.

     DESCRIPTION
	  Msgget tests the msgget() subroutine call interface for
	  conformance to the XSI System	Interfaces Page:msgget()

     TESTS
     Compliance
	  1    When key	specifies an existing message queue, then a
	       successful call to msgget(key,msgflg) returns the
	       message queue identifier	associated with	key.

	  2    When key	is equal to IPC_PRIVATE, then a	successful
	       call to msgget(key,msgflg) creates a new	message	queue
	       with
	       a. msg_perm.cuid	and msg_perm.uid set equal to the
	       effective user ID of the	calling	process
	       b. msg_perm.cgid	and msg_perm.gid set equal to the
	       effective group ID of the calling process
	       c. the access permission	bits in	msg_perm.mode set
	       equal to	the access permissions specified in msgflg
	       d. msg_qnum, msg_lspid, msg_lpid, msg_stime, and
	       msg_rtime all set equal to 0
	       e. msg_ctime set	equal to the current time
	       f. msg_qbytes set equal to the system limit.

	  3    When key	does not already have a	message	queue
	       associated with it and msgflg & IPC_CREAT is true, then
	       a successful call to msgget(key,msgflg) creates a new
	       message queue with
	       a. msg_perm.cuid	and msg_perm.uid set equal to the
	       effective user ID of the	calling	process
	       b. msg_perm.cgid	and msg_perm.gid set equal to the
	       effective group ID of the calling process
	       c. the access permission	bits in	msg_perm.mode set
	       equal to	the access permissions specified in msgflg
	       d. msg_qnum, msg_lspid, msg_lpid, msg_stime, and
	       msg_rtime set equal to 0
	       e. msg_ctime set	equal to the current time
	       f. msg_qbytes set equal to the system limit.

	  4    When key	already	has a message queue associated with it
	       and msgflg has the IPC_CREAT flag set and the IPC_EXCL
	       flag unset, then	a successful call to
	       msgget(key,msgflag) returns the message queue
	       identifier associated with the existing message queue.

     Deviance
	  5    EACCES in 'errno' and return -1 on a call to
	       msgget(key,msgflg) when key specifies an	existing
	       message queue for which the caller does not have	the



     Page 1					    (printed 2/21/103)






     msgget(XPG4.os/ipcRelease 4.4.1 (The Open Groumsgget(XPG4.os/ipc)



	       access permission as requested in msgflg.

	  6    ENOENT in 'errno' and return -1 on a call to
	       msgget(key,msgflg) when key specifies a non-existing
	       message queue and IPC_CREAT is not set in msgflg.

	  7    EEXIST in 'errno' and return -1 on a call to
	       msgget(key,msgflg) when key specifies an	existing
	       message queue, with the IPC_CREAT bit set in msgflg and
	       the the IPC_EXCL	bit set	in msgflg.

     Untestable	Aspects
	  1    ENOPSC in 'errno' and return -1 on a call to
	       msgget(key,msgflg) when the number of message queues
	       allowed by the system is	exceeded.
	       Reason: This system limit is not	available from the
	       system. It is unclear whether it	can be provided	as a
	       parameter.

     PROBLEMS
	  It is	unclear	what value will	be assigned to msg_qbytes.  A
	  possible partial test	would be to create multiple queues and
	  check	that the value is the same each	time.

     RELEASE
	  4.4.1	(06/09/97)
	  Copyright 1997, The Open Group
	  All Rights Reserved



























     Page 2					    (printed 2/21/103)



