Re: [Boost-users] [interprocess]files locations for mutex and named shm
I'm being bitten by the surprise discovery that different Windows users can't(?) communicate via named shared memory using Boost Interprocess as in the post below from 2008-09-18 (Changing all processes to use the same TMP directory is not an option for us due to interoperability requirements). Is there a workaround? Was anything ever done about the proposed solution below? Another alternative would be to make it possible to specify the "Boost Interprocess temp directory". Mike Eugen Stoianovici wrote:
Ion Gaztañaga wrote:
Eugen Stoianovici wrote:
Ion Gaztañaga wrote:
You can't, unless you modify the code in:
boost/interprocess/detail/temp_dir_helper.hpp
Why do you want to change the location of those files?
Ion This is only a problem if you run processes with different users. Ex: if you're using shared memory between an user app and a service, the service will look for the segment in C:\Windows\Temp\ and the user app will look for it in C:\Documents and settings\user\local settings\etc. My changes should go in the temp_dir_helpers.hpp file, right?
Good point. I'll try to see if I can unify this when I have a bit of time. Maybe we can find a common directory for all processes. Any hint or suggestion?
On XP C:\Windows\Temp would be a good idea but i don't know if it is writable by all users. I'm going to look into it when i get the chance, but for now, changing the "TMP" env to something else is enough for me.
Thanks again, Eugen Stoianovici
Mike Spertus escribió:
I'm being bitten by the surprise discovery that different Windows users can't(?) communicate via named shared memory using Boost Interprocess as in the post below from 2008-09-18 (Changing all processes to use the same TMP directory is not an option for us due to interoperability requirements). Is there a workaround? Was anything ever done about the proposed solution below? Another alternative would be to make it possible to specify the "Boost Interprocess temp directory".
For boost 1.40 I've changed the TMP directory for the Common Documents directory, searching that folder using the registry. In theory, that folder is accessible by all processes and should be present in all systems. Nevertheless, I'll add the option to specify the temp directory to my to-do list, maybe using an environment variable? Best, Ion
participants (2)
-
Ion Gaztañaga
-
Mike Spertus