blob: 4f92a408f9a53a25f84981ff7e84da9b8ca89af4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
$NetBSD: patch-ad,v 1.2 2011/10/17 02:10:31 schnoebe Exp $
# comment out the atttempts at shared memory (at least for NetBSD)
--- Foundation/src/SharedMemory_POSIX.cpp.orig 2011-02-09 09:12:55.000000000 +0000
+++ Foundation/src/SharedMemory_POSIX.cpp
@@ -69,7 +69,8 @@ SharedMemoryImpl::SharedMemoryImpl(const
flags |= O_RDONLY;
// open the shared memory segment
- _fd = ::shm_open(_name.c_str(), flags, S_IRUSR | S_IWUSR);
+ // _fd = ::shm_open(_name.c_str(), flags, S_IRUSR | S_IWUSR);
+ _fd = -1;
if (_fd == -1)
throw SystemException("Cannot create shared memory object", _name);
@@ -78,7 +79,7 @@ SharedMemoryImpl::SharedMemoryImpl(const
{
::close(_fd);
_fd = -1;
- ::shm_unlink(_name.c_str());
+ //::shm_unlink(_name.c_str());
throw SystemException("Cannot resize shared memory object", _name);
}
map(addrHint);
@@ -148,7 +149,7 @@ void SharedMemoryImpl::close()
}
if (!_fileMapped && _server)
{
- ::shm_unlink(_name.c_str());
+ //::shm_unlink(_name.c_str());
}
}
|