


     msgctl(XPG4.os/ipcRelease 4.4.1 (The Open Groumsgctl(XPG4.os/ipc)



     NAME
	  XPG4.os/ipc/msgctl - control a message queue.

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

     TESTS
     Compliance
	  1    When the	effective user ID matches the user ID of the
	       message queue and the read permission is	allowed	for
	       the owner of the	queue, then a successful call to
	       msgctl(msqid, IPC_STAT, buf) obtains the	status of the
	       message queue and returns 0.

	  2    When the	effective user ID matches the user ID of the
	       creator of the message queue and	the read permission is
	       allowed for the owner of	the queue, then	a successful
	       call to msgctl(msqid, IPC_STAT, buf) obtains the	status
	       of the message queue and	returns	0.

	  3    When the	effective user ID does not match either	the
	       owner or	the creator of the message queue and the
	       effective group ID or one of the	supplementary group
	       IDs matches the group ID	of the owner of	the message
	       queue and read permission is allowed for	the group,
	       then a call to msgctl(msqid, IPC_STAT, buf) obtains the
	       status of the message queue and returns 0.

	  4    When the	effective user ID does not match either	the
	       owner or	the creator of the message queue and the
	       effective group ID or one of the	supplementary group
	       IDs matches the group ID	of the creator of the message
	       queue and read permission is allowed for	the group,
	       then a call to msgctl(msqid, IPC_STAT, buf) obtains the
	       status of the message queue and returns 0.

	  5    When the	effective user ID does not match either	the
	       owner or	the creator of the message queue and neither
	       the effective group ID nor any of the supplementary
	       group IDs match the group ID of the owner or creator of
	       the message queue and read permission is	allowed	for
	       others, then a call to msgctl(msqid, IPC_STAT, buf)
	       obtains the status of the message queue.

	  6    When the	process	has the	appropriate privileges,	then a
	       call to msgctl(msqid, IPC_STAT, buf) obtains the	status
	       of the message queue.

	  7    When the	effective user ID matches the user ID of the
	       message queue, then a call to msgctl(msqid, IPC_SET,
	       buf) sets the user ID, group ID,	mode and maximum



     Page 1					    (printed 2/21/103)






     msgctl(XPG4.os/ipcRelease 4.4.1 (The Open Groumsgctl(XPG4.os/ipc)



	       number of bytes allowed in the queue (where the request
	       is to not increase this value).

	  8    When the	effective user ID matches the user ID of the
	       creator of the message queue, then a call to
	       msgctl(msqid, IPC_SET, buf) sets	the user ID, group ID,
	       mode and	maximum	number of bytes	allowed	in the queue
	       (where the request is to	not increase this value).

	  9    When the	process	has appropriate	privileges, then a
	       call to msgctl(msqid, IPC_SET, buf) sets	the user ID,
	       group ID, mode and the maximum number of	bytes allowed
	       in the queue.

	  10   When the	effective user ID matches the user ID of the
	       queue, then a call to msgctl(msqid, IPC_RMID, buf)
	       removes the message queue.

	  11   When the	effective user ID matches the user ID of the
	       creator of the queue, then a call to msgctl(msqid,
	       IPC_RMID, buf) removes the message queue.

	  12   When the	the effective user ID has appropriate
	       privileges, then	a call to msgctl(msqid,	IPC_RMID, buf)
	       removes the message queue.

     Deviance
	  13   EINVAL in errno and return -1 on	a call to
	       msgctl(msqid, IPC_STAT, buf) when the value of msqid is
	       invalid

	  14   EINVAL in errno and return -1 on	a call to
	       msgctl(msqid, IPC_STAT, buf) when the value of cmd is
	       invalid

	  15   EPERM in	'errno'	and return -1 on a call	to
	       msgctl(msqid, IPC_SET, buf) when	the effective user ID
	       does not	match the user ID of the creator, or the user
	       ID of the owner of the message queue and	the process
	       does not	have appropriate privileges.

	  16   EPERM in	'errno'	and return -1 on a call	to
	       msgctl(msqid, IPC_SET, buf) to increase the maximum
	       number of bytes allowed on the queue when the process
	       does not	have appropriate privileges.

	  17   EPERM in	'errno'	and return -1 on a call	to
	       msgctl(msqid, IPC_RMID, buf) when the process does not
	       have appropriate	privileges and does not	match the
	       owner of	the queue or the user ID of the	creator	of the
	       queue.




     Page 2					    (printed 2/21/103)






     msgctl(XPG4.os/ipcRelease 4.4.1 (The Open Groumsgctl(XPG4.os/ipc)



	  18   EACCES in 'errno' and return -1 on a call to
	       msgctl(msqid, IPC_STAT, buf) when the read permissions
	       are not allowed for the user, group and others.

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















































     Page 3					    (printed 2/21/103)



