Changed Windows shared memory back to non-global.

This commit is contained in:
Thulinma 2015-04-16 14:07:04 +02:00
parent e105569b06
commit 2808595d7b

View file

@ -293,14 +293,14 @@ namespace IPC {
#ifdef __CYGWIN__
if (master) {
//Under cygwin, all pages are 4 bytes longer than claimed.
handle = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, len+4, std::string("Global\\" + name).c_str());
handle = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, len+4, name.c_str());
} else {
int i = 0;
do {
if (i != 0) {
Util::sleep(1000);
}
handle = OpenFileMappingA(FILE_MAP_ALL_ACCESS, FALSE, std::string("Global\\" + name).c_str());
handle = OpenFileMappingA(FILE_MAP_ALL_ACCESS, FALSE, name.c_str());
i++;
} while (i < 10 && !handle && autoBackoff);
}