Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!rex!rawdon From: rawdon@rex.cs.tulane.edu (Michael Rawdon) Newsgroups: comp.unix.questions Subject: Re: wait on ipc message Message-ID: <5335@rex.cs.tulane.edu> Date: 9 Dec 90 19:13:54 GMT References: <1990Dec9.091203.4188@bbt.se> Organization: C.S. Dept, Tulane Univ., New Orleans, LA Lines: 30 In <1990Dec9.091203.4188@bbt.se> pgd@bbt.se writes: >I want to stall a process, to wake up on a message received >through a SYSV ipc message, or data available on any file. >That is, i want a select/poll to also include messages received >through an ipc channel. If I understand what you're asking correctly, I believe if you have the following command format for receiving a message: msgrcv (msqid, msgp, msgsz, msgtyp, msgflg) then if you simply do *not* set IPC_NOWAIT in msgflg, the process will block until a message of type 'msgtyp' appears on the message queue with id 'msqid'. 'msqid' is an int and 'msgtyp' is a long. 'msgflg' is an int also, actually, but INC_NOWAIT is predefined in one of the relevant header files. I got this info from IBM's AIX manuals, but the functionality was identical (or nearly so, enough so that I don't recall having any problems with it) on our Pyramid 9815 running System V. -- Michael Rawdon Tulane University, New Orleans, Louisiana ------------------------------------------------------------------------------ Internet: rawdon@rex.cs.tulane.edu | Knowledge may be power, but Usenet: rex!rawdon.uucp | withholding knowledge can be a Bitnet: CS6FECU@TCSVM | dangerous thing. ----------------------------------------------------------------------------- Disclaimer: Opinions mine, typos and grammar errors someone else's.