Hi,
I forgot to mention that the exception was from the receive( ) method.
Thanks & Regards,
Rohini Chandra P
---------- Forwarded message ----------
From: rohini chandra pallapothu
Date: Mon, Nov 29, 2010 at 7:14 PM
Subject: boost::interprocess_exception::library_error
To: boost-users@lists.boost.org
Hi,
I am trying to use boost message queues for interprocess communincation
between a command and a server. I had been receiving the below exception in
the server.
*boost::interprocess_exception::library_error*
Below is the server code I had problems with. The exception was consistent
when the maximum message size argument of the method was greater than the
size of the data I was trying to send.
I am trying to send an integer. When I assigned the max_msg_size variable a
size greater than the size of int, it threw an exception. When I assigned
the size of int, it is working fine. I got this working
just before I was about to send this mail. But I want to understand the
correct reason behind the exception. Is it not allowed to send a message
which is less than the maximum message size because the name maximum message
size itself says that it should only not exceed. I am working on a 64 bit
SUSE 11. I am new to boost and Linux. I had even tried to change the
/proc/sys/kernel/shmmax value after reading one of the discussion on the
same exception in the BOOST archives which did not work. Could anyone please
help. Please let me know if you need more information.
*std::size_t max_msg_size=sizeof(int);*
============testsvc=================
#include
#include
#include <iostream>
using namespace std;
using namespace boost::interprocess;
int main(){
cout<<"in main"<