Path: utzoo!dciem!nrcaer!sce!xicom!alex From: alex@xicom.uucp (Alex Laney) Newsgroups: comp.unix.i386 Subject: Re: Message queues. Possibly dumb mistake. Message-ID: <1989Dec20.192704.20485@xicom.uucp> Date: 20 Dec 89 19:27:04 GMT References: <1989Dec7.150205.12104@antel.uucp> Reply-To: alex@xicom.UUCP (Alex Laney) Organization: Xicom Products Group, Ottawa, Ont. Canada Lines: 30 In article <1989Dec7.150205.12104@antel.uucp> geoff@antel.uucp (Geoff Vona) writes: > >I'm trying to use messages and queues under 386/ix 2.0.2 and I'm having >problems. In msgsnd and msgrcv, messages are passed using a structure >called msgbuf that looks like this: > >struct msgbuf { >long mtype; >char mtext[1]; >}; > >(from /usr/include/sys/msg.h) You can use these one-byte messages if you want ... but I define a struct like this ... struct { long mtype; char buf[2000]; } and it works. You must have a buffer large enough on both ends for your messages... -- Alex Laney, Xicom Group, National Semiconductor, Ottawa, Canada (613) 728-9099 uunet!mitel!sce!xicom!alex (alex@xicom.uucp) Fax: (613) 728-1134 "You save time, increase the amount of work done and it is easy."