LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2009, 06:19 AM   #1
koumodaki
LQ Newbie
 
Registered: Dec 2008
Posts: 5

Rep: Reputation: 0
Unhappy mq_open() returns


hi everyone,

I am trying to establish communication between 2 therads in my application with a named queue. The function call in my program is
Code:
mqd_t msgq_id = mq_open("/Message Box",O_RDWR | O_CREAT | O_EXCL, S_IRWXU | S_IRWXG, NULL);
the piece of code compile correctly and on running the application, this function fails. I checked the errno variable, I find that its been set to EAGAIN(11). I get the same errno when I retry executing this API.
I can understand other messages but EAGAIN!!!

Can you guys please let me know where I have gone wrong in this declaration
 
Old 02-19-2009, 06:46 AM   #2
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Are you creating the queue only one time? How does the white-space in your queue name affect it's creation?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ENOMEM on mq_open() call roxasmn Linux - Software 6 08-10-2011 11:16 AM
mq_open error mageshvan Programming 1 10-08-2007 12:05 PM
mq_open error ('invalid arg') on RHEL4 lambert_anne Programming 1 03-14-2007 08:12 AM
mq_open fails on Suse 9.2 / 9.3 supaflav Programming 1 11-04-2005 01:12 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration