Boost C++ Libraries: Ticket #10047: Using Boost:Interprocess on Android https://svn.boost.org/trac10/ticket/10047 <p> It is not a bug, but it might safe some time to others using boost:interprocess library on Android. </p> <p> This library usually uses a temporary directory to store the data that is being shared among processes. The directory path used for this can be found on os_file_functions.hpp-:get_temporary_path. </p> <p> The thing is that if you do not modify this file and add ´/sdcard´ to the possible paths that your process can use, then you cannot share information among android Apps due to the permission restrictions that exist for processes on android storing data outside their sandbox. </p> <p> It will be a good feature to have boost compile with this option on. Or provide a static method to add my own Temporary Path. </p> <p> Note: I am not completely sure if something exists to solve this problem. </p> <p> Regards, </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10047 Trac 1.4.3 Ion Gaztañaga Tue, 27 May 2014 13:26:23 GMT <link>https://svn.boost.org/trac10/ticket/10047#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10047#comment:1</guid> <description> <p> In the soon to be released Boost 1.56 version if BOOST_INTERPROCESS_SHARED_DIR_PATH is defined, that directory is used to store data among processes. Do you think it could work in your case? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ronny Bantin</dc:creator> <pubDate>Wed, 01 Oct 2014 10:15:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10047#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10047#comment:2</guid> <description> <p> I have not reported this ticket. I can say this works on Android. But the /sdcard is mount to an flash device. So there is a significant latency and maybe you reduce the regular life time of the internal flash device. </p> <p> Android does not support Posix SHM. Instead, it has its own shared memory implementation (/dev/ashmem). It would be very nice to porting boost::interprocess using Android shared memory like "windows_shared_memory.hpp". </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 16 Mar 2018 01:47:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10047#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10047#comment:3</guid> <description> <p> I solved it by revision the file <strong>'interprocess/detail/shared_dir_helpers.hpp'</strong> line 109 to change the dir_path to an existed dir (for me, it's /data) in get_shared_dir_root() </p> <blockquote> <p> #elif defined <span class="underline">ANDROID</span> </p> <blockquote> <p> dir_path="/data" </p> </blockquote> <p> #else </p> <blockquote> <p> dir_path="/tmp" </p> </blockquote> </blockquote> </description> <category>Ticket</category> </item> </channel> </rss>