Boost C++ Libraries: Ticket #4655: [Interprocess] The shared_memory_object::remove return false on success https://svn.boost.org/trac10/ticket/4655 <p> The shared_memory_object::remove return false on success. This is due to the code doing: return detail::delete_file(shmfile.c_str()) == 0; </p> <p> but the detail::delete_file already return a bool that is true on succes </p> <p> Simply remove the ==0 fix the problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4655 Trac 1.4.3 Kistner Eric <eric.kistner@…> Fri, 17 Sep 2010 14:29:49 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4655#comment:1 https://svn.boost.org/trac10/ticket/4655#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> It seems to be fixed in the svn-trunk. </p> Ticket Volker Wippel <Volker.Wippel@…> Wed, 27 Apr 2011 15:15:19 GMT status, version changed; resolution deleted https://svn.boost.org/trac10/ticket/4655#comment:2 https://svn.boost.org/trac10/ticket/4655#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.44.0</span> → <span class="trac-field-new">Boost 1.46.1</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> boost 1.46.1, WinXP, MS VC2005 </p> <p> shared_memory_object::remove still returns false on success in about 1 of 30 calls. Label_A message below pops up. </p> <pre class="wiki">string const name = m_ShMem-&gt;get_name(); m_TraceQueue-&gt;removeUser(); m_TraceQueue-&gt;~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(), &amp;buff)); if (toDelete) cerr &lt;&lt; "Still trying to remove " &lt;&lt; name &lt;&lt; endl; //sleep... else cerr &lt;&lt; name &lt;&lt; " not existing anymore. Skip\n"; // Label_A } } </pre> Ticket Ion Gaztañaga Sat, 24 Dec 2011 19:22:11 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4655#comment:3 https://svn.boost.org/trac10/ticket/4655#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in Boost 1.48 </p> Ticket Volker.Wippel@… Wed, 18 Jul 2012 15:00:37 GMT status, version changed; resolution deleted https://svn.boost.org/trac10/ticket/4655#comment:4 https://svn.boost.org/trac10/ticket/4655#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.46.1</span> → <span class="trac-field-new">Boost 1.50.0</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Fixed up to 1.49, again occurs in 1.50. </p> Ticket Ion Gaztañaga Sun, 10 Feb 2013 23:11:16 GMT <link>https://svn.boost.org/trac10/ticket/4655#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4655#comment:5</guid> <description> <p> This seems related to bug <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7923" title="#7923: Bugs: Multiple consecutive named_mutex::remove (closed: fixed)">#7923</a>, that is already fixed. Can you try trunk code to see if this bug is also fixed? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Thu, 23 May 2013 22:21:49 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4655#comment:6 https://svn.boost.org/trac10/ticket/4655#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This bug seems fixed with <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7923" title="#7923: Bugs: Multiple consecutive named_mutex::remove (closed: fixed)">#7923</a>. </p> Ticket