From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,cf7b099c99ee894b X-Google-Attributes: gidfc89c,public X-Google-Thread: 1014db,cf7b099c99ee894b X-Google-Attributes: gid1014db,public X-Google-Thread: f678f,cf7b099c99ee894b X-Google-Attributes: gidf678f,public X-Google-Thread: fee84,cf7b099c99ee894b X-Google-Attributes: gidfee84,public From: "Jeremy D. Levine" Subject: Re: Digital Unix message queue programming problem!! Date: 1997/02/27 Message-ID: <33159E1E.2781@amarex.com>#1/1 X-Deja-AN: 222396132 References: <33162B5F.437B@silicon.net.my> Organization: Amarex Tech. Newsgroups: comp.unix.osf.osf1,comp.unix.programmer,comp.unix.osf.misc,comp.lang.c Kok Fock Seng wrote: > > > if (( messageid = msgget ((key_t)(6000L), IPC_CREAT|0660)) == -1 ) > exit (-1); ^^^^^ > fprintf(stderr, "[%d]", messageid); > > if ( msgsnd ( messageid, &m, strlen(m.msgbuf)+1, IPC_NOWAIT) == -1) > ^^^^^^^^^^ I think if you do a ipcs -q you will you that the queue you created has no mode bits set ( ie. no read or write bits ). Use ipcrm -q to remove the queue and change you program to match the above lines. I tried it and it worked. - jeremy levine - levine@amarex.com