id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 8058,boost::python::exec_file not closing file descriptor with python 2.7,shobhit87@…,Stefan Seefeld,"I am trying to execute a python script in my c++ code using python2.7 and boost1.47.0 Here is the code: {{{ #include ""boost/python.hpp"" #include int main(int argc, char** argv) { Py_Initialize(); boost::python::object test = boost::python::import(""__main__""); boost::python::object testDict = test.attr(""__dict__""); while (1){ try { boost::python::exec_file(""test.py"", testDict, testDict); } catch(boost::python::error_already_set& e) { PyErr_Print(); } catch(std::exception const &exc) { std::cerr << exc.what(); PyErr_Print(); _exit(0); } } Py_Finalize(); return 0; } }}} It is working fine with python2.4 and boost1.34.1(on both 32 bits and 64 bits machine). But on 64 bit machine it is not closing the file descriptor with python2.7. After crossing the maximum FD limit(i.e. ulimit value) its crashing with the following error: test.py : no such fileIOError: [Errno 24] Too many open files: 'test.py' ",Bugs,closed,To Be Determined,python USE GITHUB,Boost 1.47.0,Problem,fixed,,