|
Boost Users : |
Subject: Re: [Boost-users] error in recreation of shared memory using boost:: interprocess
From: Christoph Gysin (christoph.gysin_at_[hidden])
Date: 2009-10-07 19:56:16
> I am creating shared memory with given name(by given file name with key
> value ) and creating the map in the shared region by parsing key-value from
> the file. First time it is ok. but when i try to do it again, I am getting
> following error.
>
> terminate called after throwing an instance of
> 'boost::interprocess::interprocess_exception'
> Â what(): Â File exists
> Aborted
Please read the documentation:
http://www.boost.org/doc/libs/1_40_0/doc/html/boost/interprocess/shared_memory_object.html
...
shared_memory_object(create_only_t, const char * name, mode_t mode);
Creates a shared memory object with name "name" and mode "mode", with
the access mode "mode" If the file previously exists, throws an error.
shared_memory_object(open_or_create_t, const char * name, mode_t mode);
Tries to create a shared memory object with name "name" and mode
"mode", with the access mode "mode". If the file previously exists, it
tries to open it with mode "mode". Otherwise throws an error.
...
Christoph
-- echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org_at_fr33z3
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