boost::process system leaking file descriptors
问题 It seems like boost::process::system is leaking fds: Let's say I have this simple code to flush iptables config every 3 seconds (just an example): #include <boost/process.hpp> #include <thread> int main(void) { while(true) { std::this_thread::sleep_for(std::chrono::seconds(3)); boost::process::system(boost::process::search_path("iptables"), "-F"); } return 0; } If I observe the count of open file descriptors by listing /proc/PID/fd |wc -l , I can see that the count increases by one every 3