Boost C++ Libraries: Ticket #8301: filesystem::canonical() has a race condition on Windows 7/10 https://svn.boost.org/trac10/ticket/8301 <p> read_symlink() often throws a exception. </p> <p> to confirm this problem, please compile and run the attached file. </p> <p> i think it caused by read_symlink() opening a file exclusively. </p> <pre class="wiki"> handle_wrapper h( create_file_handle(p.c_str(), GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0)); </pre><p> FILE_SHARE_READ argument resolves this problem, isn't it? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8301 Trac 1.4.3 y.hoshizuki Mon, 18 Mar 2013 02:44:30 GMT attachment set https://svn.boost.org/trac10/ticket/8301 https://svn.boost.org/trac10/ticket/8301 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">canonical.cpp</span> </li> </ul> <p> test program </p> Ticket ladislav.sopko@… Tue, 26 Sep 2017 09:29:26 GMT version, summary changed https://svn.boost.org/trac10/ticket/8301#comment:1 https://svn.boost.org/trac10/ticket/8301#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.51.0</span> → <span class="trac-field-new">Boost 1.59.0</span> </li> <li><strong>summary</strong> <span class="trac-field-old">filesystem::canonical() has a race condition on Windows 7</span> → <span class="trac-field-new">filesystem::canonical() has a race condition on Windows 7/10</span> </li> </ul> <p> We found the same .... </p> Ticket