The POCO C++ Libraries (POCO stands for POrtable COmponents) are open source C++ class libraries that simplify and accelerate the development of network-centric, portable applications in C++. The libraries integrate perfectly with the C++ Standard Library and fill many of the functional gaps left open by it. Their modular and efficient design and implementation makes the POCO C++ Libraries extremely well suited for embedded development, an area where the C++ programming language is becoming increasingly popular, due to its suitability for both low-level (device I/O, interrupt handlers, etc.) and high-level object-oriented development. Of course, the POCO C++ Libraries are also ready for enterprise-level challenges.
32 lines
947 B
Text
32 lines
947 B
Text
$NetBSD: patch-ad,v 1.1.1.1 2009/01/10 16:05:32 tnn2 Exp $
|
|
|
|
--- Foundation/src/SharedMemory_POSIX.cpp.orig 2008-10-09 18:14:00.000000000 +0200
|
|
+++ 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());
|
|
}
|
|
}
|
|
|