Boost logo

Boost :

Subject: [boost] [interprocess] BOOST_INTERPROCESS_SHARED_DIR_PATH from env variable
From: Jakub Szymanski (qba.szymanski_at_[hidden])
Date: 2014-10-10 10:28:23


Hi,

Will it be possible to have shared_dir not hardcoded?
Currently it is determine by some tricks (some involve event log parsing on
windows, which fails a lot).
The only practical solution for us was to use
BOOST_INTERPROCESS_SHARED_DIR_PATH define.

boost/interprocess/detail/shared_dir_helpers.hpp

inline void get_shared_dir(std::string &shared_dir)
{
   #if defined(BOOST_INTERPROCESS_SHARED_DIR_PATH)
      shared_dir = BOOST_INTERPROCESS_SHARED_DIR_PATH;
   #else
      get_shared_dir_root(shared_dir);
      #if defined(BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME)
         shared_dir += "/";
         get_bootstamp(shared_dir, true);
      #endif
   #endif
}

That has limitations tough as it makes it very difficult to test software
in isolation (it requires access to the same folder).
Similarly it makes is difficult to run program of machines with different
file structure.

Can it be configurable by some environment variable ?

cheers
--jakub


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk