message queues in SunView?

Matt Smith cg-atla!msmith at decvax.UUCP
Wed Jul 19 06:43:11 AEST 1989


Hello.  Can someone tell me if it is possible to use message queues in
SunView applications?  Also, if it is possible, is it necessary to go
through the notifier when attempting to receive a message from the queue?

Specifically, I am having a problem with my msgrcv() call being
interrupted:
	msgrcv: Interrupted system call

If I make sure that there is a message on the queue of the type desired by
the msgrcv call prior to calling msgrcv, all works well.  However, msgrcv
appears not to block or is interrupted while blocking  (perhaps by the
notifier?) when the message is placed on the queue.

I am using the following code:

if (kill(client_pid, SIGCALL) == -1)
	perror("kill");
else{
	if ((msgqid = msgget(MSGKEY, IPC_CREAT|QPERM)) == -1){
		perror("msgget");
		exit();
	}
	if (msgrcv(msgqid, &msgstruct, MAX_MSG_LEN, client_pid, MSG_NOERROR) == -1){
		perror("msgrcv");
		return;
	}
}

I am sending a message to a client SunView process, which then places a
message on the queue.  If I throw a sleep(1) call in before the msgrcv(),
all works smoothly.

Thanks in advance for any information or help you may have.

Matt

{decvax|ima|ulowell}!cg-atla!msmith



More information about the Comp.sys.sun mailing list