Xref: utzoo comp.unix.wizards:11831 comp.bugs.sys5:631 Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!agate!bionet!apple!bloom-beacon!tut.cis.ohio-state.edu!osu-cis!att!ihlpb!gregg From: gregg@ihlpb.ATT.COM (Wonderly) Newsgroups: comp.unix.wizards,comp.bugs.sys5 Subject: Re: System V messages problem Message-ID: <8957@ihlpb.ATT.COM> Date: 19 Oct 88 14:16:45 GMT References: <1794@runx.ips.oz> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 27 From article <1794@runx.ips.oz>, by rosko@runx.ips.oz (Ross McKay): > > Hello, > I have been trying to get message passing to work on my Microport > System. > ..... > > ------CUT HERE FOR EXAMPLE CODE---8<----------------------------------------- > > for(i = 0; i < 20; ++i) ^^^ PLEASE, PLEASE, PLEASE use NSIG here or something a little more portable. Signal numbers start at 1 besides... > signal(i, cleanup); > > if((msgid = msgget(MSGKEY, -1)) == -1) ^^^ Try using the actual flag here. MAKE IT OBVIOUS WHAT THE HECK YOU ARE DOING. You are also setting IPC_EXCL, IPC_NOWAIT besides IPC_CREATE. If the key already exists, then this will fail with EEXIST. -- Gregg Wonderly AT&T Bell Laboratories DOMAIN: gregg@ihlpb.att.com IH2D217 - (312) 979-2794 UUCP: att!ihlpb!gregg