cannot open POSIXmessage queue (mq_open
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > cannot open POSIXmessage queue (mq_open




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    cannot open POSIXmessage queue (mq_open  
yoni64@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-21-07 06:19 PM

Hi
I encounter a problem opening POSIX message queue.
I am using Red Hat Linux version 2.6.9-42.0.10.ELsmp.
I compile my code with gcc(Red Hat 3.4.6-3) with -lrt flag.
I wrote the following code to open the message queue

mqd_t msgq;
struct mq_attr mqstat;

memset(&mqstat,0,sizeof(mqstat));
mqstat.mq_maxmsg = 100;
mqstat.mq_msgsize = sizeof(DEV_MSG_T); /* = 8 */
/* create sender queue */
msgq  = mq_open("/rfu3",O_CREAT | O_RDWR, 0666,&mqstat);
DM_ASSERT(msgq == (mqd_t)-1,ERROR,printf("errno = %d
\n",errno);perror("cannot open queue"))


This code always fails. msgq always return -1 and errno is 22 (EINVAL
- Invalid parameters)

Can anyone help - please?

"));






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:55 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register