Hi,

Am creating a msgqueue using mq_open
</code>
main()
{
struct mq_attr attr; /* message queue attributes structure */
memset(&_attr,0,sizeof(struct mq_attr));
attr.mq_maxmsg= 10;
attr.mq_msgsize= 20;

msg.flag = HS_FWK_MSGQ_FLAGS;
mq_open("/h_qname",O_CREAT|O_RDWR|O_EXCL|O_NONBLOCK, 00666,&attr);

then sending message using
mq_send(....)
}


Again opening the message queue using the name to receive the message...but mq_open fails here...
main()
{
struct mq_attr attr; /* message queue attributes structure */
memset(&_attr,0,sizeof(struct mq_attr));
attr.mq_maxmsg= 10;
attr.mq_msgsize= 20;

msg.flag = HS_FWK_MSGQ_FLAGS;
mq_open("h_qname",O_CREAT|O_RDONLY, 00666,&attr);

}
<code>


I tried with O_RDWR flag too... but thatz also failing... i couldn't find out where exactly am going wrong... could somebody help me on this.

Thanks.