(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.
Use Mac Sandbox compatible temp folder
Replaced BOOST_INTERPROCESS_TEMP_DIR_FUNC with BOOST_INTERPROCESS_SHA…
- 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.
Thanks for the patch!