Provide extension point so library user can provide default temp folder #30

merged 3 commits into from Nov 13, 2016


None yet

2 participants


(That's a slightly changed version of my previous PR.)

The /tmp folder is not accessible for sandboxed Applications on the Mac. The docs are clear that you have to get the correct folder via the Mac APIs.

Several sandboxed applications can define an application group which has shared access rights to some filesystem locations. In order to get the shared temp folder for the application group, the user must know the group identifier string and then call

[[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:(NSString *)groupIdentifier]

The returned path is user-specific and thus a hard-coded BOOST_INTERPROCESS_SHARED_DIR_PATH doesn't do.

Sebastian Th... added some commits Mar 19, 2015
Sebastian Theophil Use Mac Sandbox compatible temp folder 6bb41cb
Sebastian Theophil Remove 5ab7370

- BOOST_INTERPROCESS_SHARED_DIR_FUNC has the same semantics as BOOST_INTERPROCESS_SHARED_DIR_PATH and can be used as the more flexible alternative
- Added documentation

I've simplified my change. There is now a define BOOST_INTERPROCESS_SHARED_DIR_FUNC that can be used instead of BOOST_INTERPROCESS_SHARED_DIR_PATH when the shared folder has to be determined at runtime. Both must define the full shared folder that the temp files will be placed in. No subfolder will be created. I've also added documentation.

@igaztanaga igaztanaga merged commit 6956f11 into boostorg:develop Nov 13, 2016

Thanks for the patch!

@godbyk godbyk referenced this pull request in OSVR/OSVR-Core Jan 20, 2017

Update for Boost 1.63 #518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment