Message queues. Possibly dumb mistake.

Alex Laney alex at xicom.uucp
Thu Dec 21 06:27:04 AEST 1989


In article <1989Dec7.150205.12104 at antel.uucp> geoff at 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 at xicom.uucp)     Fax: (613) 728-1134
"You save time, increase the amount of work done and it is easy."



More information about the Comp.unix.i386 mailing list