


     msgsnd(XPG4.os/ipcRelease 4.4.1 (The Open Groumsgsnd(XPG4.os/ipc)



     NAME
	  XPG4.os/ipc/msgsnd - send message to message queue.

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

     TESTS
     Compliance
	  1    When there is sufficient	space in the queue and the
	       system, then a successful call to
	       msgsnd(msqid,msgp,msgsz,msgflg) sends the message
	       pointed to by msgp of type mtype	and size msgsz to the
	       message queue specified by msqid, increments msg_qnum
	       by 1, sets msg_lspid to the process ID of the calling
	       process,	sets msg_stime to the current time, and
	       returns 0.

	  2    When there is insufficient space	in the queue or	the
	       system to send the message pointed to by	msgp and the
	       IPC_NO_WAIT flag	is clear in msgflg, then a call	to
	       msgsnd(msqid,msgp,msgsz,msgflg) suspends	the calling
	       process.

	  3    When the	calling	process	is suspended during a call to
	       msgsnd(msqid,msgp,msgsz,msgflg) and the condition
	       responsible for the suspension no longer	exists,	then
	       the message is sent, msg_qnum is	incremented by 1,
	       msg_lspid is set	to the process ID of the calling
	       process,	msg_stime is set to the	current	time, and 0 is
	       returned.

     Deviance
	  4    EINTR in	errno and return -1 on a call to
	       msgsnd(msqid,msgp,msgsz,msgflg) when the	calling
	       process is interrupted by a signal.

	  5    EIDRM in	errno and return -1 on a call to
	       msgsnd(msqid,msgp,msgsz,msgflg) when the	message	queue
	       msqid is	removed	and the	calling	process	is suspended.

	  6    EAGAIN in errno and return -1 on	a call to
	       msgsnd(msqid,msgp,msgsz,msgflg) when there is
	       insufficient space in the queue to send the message
	       pointed to by msgp and the IPC_NO_WAIT flag is set in
	       msgflg.

	  7    EINVAL in errno and return -1 on	a call to
	       msgsnd(msqid,msgp,msgsz,msgflg) when the	value of msqid
	       is not a	valid message queue identifier.

	  8    EINVAL in errno and return -1 on	a call to



     Page 1					    (printed 2/21/103)






     msgsnd(XPG4.os/ipcRelease 4.4.1 (The Open Groumsgsnd(XPG4.os/ipc)



	       msgsnd(msqid,msgp,msgsz,msgflg) when the	value of the
	       mtype field of the message is less than 1.

	  9    EINVAL in errno and return -1 on	a call to
	       msgsnd(msqid,msgp,msgsz,msgflg) when the	value of msgsz
	       is less than 0.

	  10   EACCES in errno and return -1 on	a call to
	       msgsnd(msqid, msgp, msgsz, msgflg) when an attempt is
	       made to send a message and the calling process does not
	       have write permission for the message queue.

     Untestable	Aspects
	  1    EAGAIN in errno and return -1 on	a call to
	       msgsnd(msqid,msgp,msgsz,msgflg) when there is
	       insufficient space in the system	to send	the message
	       pointed to by msgp and the IPC_NO_WAIT flag is set in
	       msgflg.
	       Reason: This requires knowledge of a system defined
	       limit which cannot be obtained from the system. If this
	       is static, it can be obtained from a parameter,
	       otherwise this is untestable.

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




























     Page 2					    (printed 2/21/103)



