Boost logo

Boost Users :

Subject: Re: [Boost-users] [interprocess] shared_memory_object constructor with create_only parameter
From: Derek Kivi (derek.kivi_at_[hidden])
Date: 2010-01-26 09:58:15


> But the second problem concerning shared_memory_object::remove(const
> char* name) is still present.
>
> > I realized another problem. If I call the static function
> > shared_memory_object::remove(const char* name), the memory should be
> > removed only when no further process has access to the memory. This
> > seems also not to work. I did the following:
> > 1. create shared memory for writing.
> > 2. open shared memory for reading
> > 3. shared_memory_object::remove(const char* name) (from the reading
> > process)
> > 4. reopen the shared memory for reading -> exception: can not find
> the file
>
> Thanks for your help and apoligizes for bothering you with my first
> problem.
>
> Philipp

Hi Philipp,

Check out http://www.boost.org/doc/libs/1_41_0/doc/html/interprocess/sharedmemorybetweenprocesses.html#interprocess.sharedmemorybetweenprocesses.sharedmemory.removing

If you call remove on a shared memory object, you are unable to reopen a shared memory object with that name.

Hope that helps.
Derek Kivi
ver. QuIC 0707


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