Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-12-2009, 11:59 PM   #1
Registered: Sep 2006
Distribution: Fedora Core 10
Posts: 254

Rep: Reputation: 32
POSIX message queues problem..

Hi all,
I am having a weird problem with posix message queues,
i am not at all able to send more than 20 bytes to the message queue, mq_send is failing and telling message too long, but i have set mq_msgsize as 100 bytes and using this attributes in mq_open as

#define MAX_SIZE 100
mqd_t mqdes;
char buff[MAX_SIZE];
struct mq_attr attr;
attr.mq_msgsize = 100;
mqdes = mq_open("/mqueue", O_RDWR | O_CREAT, 644, &attr);

my mq_send is as below

mq_send(mqdes, buff, strlen(buff)+1, 1);
When i set MAX_SIZE as 20 it is sending.. but not more than that... !!!!

Can anyone help me solving this problem...



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Not enough memory for Posix message queues... ulimit -q doesnt work ?? marconap Linux - Newbie 1 02-22-2008 05:26 AM
Posix Message Queues culin Programming 3 04-08-2007 07:01 AM
POSIX message queues(Solaris) to SYS V message queues(Linux) devershetty Programming 1 01-22-2007 10:15 AM
Posix Message queues? gdipierro Programming 20 07-26-2005 04:59 PM
POSIX message queues... infamous41md Programming 6 05-25-2004 02:53 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:11 PM.

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