Skip to content

Conversation

stheophil
Copy link

(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.

…RED_DIR_FUNC

- 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
@stheophil
Copy link
Author

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
@igaztanaga
Copy link
Member

Thanks for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants