Opened 12 years ago
Closed 9 years ago
#4655 closed Bugs (fixed)
[Interprocess] The shared_memory_object::remove return false on success
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.50.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The shared_memory_object::remove return false on success. This is due to the code doing: return detail::delete_file(shmfile.c_str()) == 0;
but the detail::delete_file already return a bool that is true on succes
Simply remove the ==0 fix the problem.
Change History (6)
comment:1 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Version: | Boost 1.44.0 → Boost 1.46.1 |
boost 1.46.1, WinXP, MS VC2005
shared_memory_object::remove still returns false on success in about 1 of 30 calls. Label_A message below pops up.
string const name = m_ShMem->get_name(); m_TraceQueue->removeUser(); m_TraceQueue->~SharedMemTraceQueue(); delete m_ShRegion; delete m_ShMem; for (bool toDelete = true; toDelete; ) { toDelete = !boost::interprocess::shared_memory_object::remove(name.c_str()); if (toDelete) { struct stat buff; string fullName; boost::interprocess::detail::tmp_filename(name.c_str(), fullName); toDelete = (0 == stat(fullName.c_str(), &buff)); if (toDelete) cerr << "Still trying to remove " << name << endl; //sleep... else cerr << name << " not existing anymore. Skip\n"; // Label_A } }
comment:4 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Version: | Boost 1.46.1 → Boost 1.50.0 |
Fixed up to 1.49, again occurs in 1.50.
comment:5 by , 10 years ago
This seems related to bug #7923, that is already fixed. Can you try trunk code to see if this bug is also fixed?
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
This bug seems fixed with #7923.
It seems to be fixed in the svn-trunk.