id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 1578,bug in readdir_r_simulator() in a multi-threaded environment,raulh39@…,Beman Dawes,"g++, Boost 1.34.1, SunOs 5.7, and a multi-threaded environment. This program never ends: {{{ #include #include #include #include #include int main() { namespace fs = boost::filesystem; fs::path path(""."",fs::native); if(fs::exists(path) && fs::is_directory(path)) { fs::directory_iterator begin(path), end; BOOST_FOREACH(fs::path file, std::make_pair(begin,end)) std::cout << file.leaf() << std::endl; } } }}} The problem is that the function readdir_r_simulator() in boost/libs/filesystem/src/operations.cpp should return != 0 to signal error, but this line: {{{ { return ::readdir_r( dirp, entry, result ); } }}} returns 0 when readdir_r() returns NULL, which means an error. The attached patch should fix the problem. ",Bugs,closed,Boost 1.36.0,filesystem,Boost 1.34.1,Problem,worksforme,,