Boost logo

Boost Users :

From: Boris (boriss_at_[hidden])
Date: 2008-03-18 13:55:36


If I instantiate a shared_memory_object with open_or_create how do I know
if it was opened or created? I ask as if it was created I need to create a
structure in the mapped region. If it was opened though I must not create
a structure (as another program created the structure before and I might
overwrite data).

I ran into this problem after creating a reader and writer. They exchange
data using a shared_memory_object. It would be great if I could start the
two programs in any order. But currently the programs don't know which one
created and which one opened the shared memory. Do I miss anything or was
open_or_create added for another use case?

Boris


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