|
Boost Users : |
Subject: [Boost-users] [interprocess] hanging when open_or_create a mapped file
From: yiling1 gong (gongyiling2010_at_[hidden])
Date: 2012-01-17 01:46:03
hello, everyone:
I¡¯m a newbie to boost::interprocess, It¡¯s really a cool library,
so I try to write a simple program to test mapped file, it¡¯s really
simple:
#include <boost/interprocess/managed_mapped_file.hpp>
using namespace boost::interprocess;
int main()
{
managed_mapped_file mfile(open_or_create,
"/home/fractal/log.bin",
1024); //hanging here.
return 0;
}
but it¡¯s hanging on the creation of mapped file, I test it both on
ubuntu 11.05(in virtualbox) and openSuse, the same problem remain.
I¡¯m sure the file exists, and I traced down the source code, it seems
the program stuck in a while loop in function priv_open_or_create(...).
except that, if I set the third argument of constructor from 1024 to 1,
it¡¯s even throw a exception( not good).
any seggestion is appreciated!!!
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net