[interprocess] BOOST_INTERPROCESS_SHARED_DIR_PATH from env variable
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
El 10/10/2014 16:28, Jakub Szymanski escribió:
Can it be configurable by some environment variable ?
This seems a good idea. I guess we won't support changing the value of the variable while the program is running, right? For performance reasons, I guess we could just cache the value the first time we access to the environment variable (or maybe in program startup). "BOOST_INTERPROCESS_SHARED_DIR_PATH" is too long for that environment variable name? Can you please open a ticket? Best, Ion
BOOST_IPC_SHARED_DIR is good name for env variable It should be read just
at the start of the process (no need to change it during running of the
program)
thanks a lot!
https://svn.boost.org/trac/boost/ticket/10644
I marked in ticket 1.57 :-)
It will be awesome to have it in this timeline.
cheers
--jakub
On Fri, Oct 10, 2014 at 7:40 AM, Ion Gaztañaga
El 10/10/2014 16:28, Jakub Szymanski escribió:
Can it be configurable by some environment variable ?
This seems a good idea. I guess we won't support changing the value of the variable while the program is running, right? For performance reasons, I guess we could just cache the value the first time we access to the environment variable (or maybe in program startup).
"BOOST_INTERPROCESS_SHARED_DIR_PATH" is too long for that environment variable name?
Can you please open a ticket?
Best,
Ion
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
El 10/10/2014 19:04, Jakub Szymanski escribió:
BOOST_IPC_SHARED_DIR is good name for env variable It should be read just at the start of the process (no need to change it during running of the program)
thanks a lot!
https://svn.boost.org/trac/boost/ticket/10644 I marked in ticket 1.57 :-) It will be awesome to have it in this timeline.
Sadly I won't have time to do it before Octobre 13 sorry. Ion
participants (2)
-
Ion Gaztañaga
-
Jakub Szymanski