Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!enea!pvab.se!robert From: robert@PVAB.SE (Robert Claeson) Newsgroups: comp.unix.questions Subject: System V message queues? Message-ID: <561@pvab.PVAB.SE> Date: 20 Feb 89 22:09:58 GMT Organization: ERBE Data AB, Sweden Lines: 21 I want to create a message queue that will serve as the communications channel for two co-operating processes. The type field of the message will be used to indicate what process the message is destined to. One process will typically fork() and exec() the second process. And I decided to use message queues (rather than pipes) since the messages are delimited (with pipes, I only get a raw data stream, no matter if the data was written byte-for-byte or in some other way). Now, the first process creates a message queue with a parameter of IPC_PRIVATE to msgget() before it starts the second process. But how do I pass the queue id to the new process? I could probably use sema- phores or shared memory for this, but how do I then pass the semaphore id to the new process? How are the System V IPC facilities intended to be used, by the way? Enlighten me, please. -- Robert Claeson, ERBE DATA AB, P.O. Box 77, S-175 22 Jarfalla, Sweden Tel: +46 758 202 50 EUnet: rclaeson@ERBE.SE Fax: +46 758 197 20 Internet: rclaeson@ERBE.SE