How can i redirect creation of Boost message queue file to user specified directory. I am using ubuntu. Currently it gets created on /dev/shm location. File is same as message queue name. I tried defining macro BOOST_INTERPROCESS_SHARED_DIR_FUNC and implemented function get_shared_dir. But it is not working. Below is my code : File : message_queue_dir_path.h
#include <string>
namespace boost {
namespace interprocess {
namespace ipcdetail {
void get_shared_dir(std::&shared_dir){
shared_dir = "/home/username/message_queue_dir";
}
}
}
}
And define macro in BOOST_INTERPROCESS_SHARED_DIR_FUNC in compilation. But still it is not creating the file at give location. It goes to /dev/shm