Boost C++ Libraries: Ticket #13605: Filedescriptor leak in boost::process https://svn.boost.org/trac10/ticket/13605 <p> Hi, </p> <p> I am using boost 1.64.0 on linux. I am using boost process to execute subprocesses. When, for some reason, the path does not point to a file, or when the file is not executable, then I keep leaking file descriptors. </p> <p> Minimal example: </p> <pre class="wiki">#include &lt;boost/process.hpp&gt; #include &lt;boost/process/extend.hpp&gt; #include &lt;boost/filesystem.hpp&gt; #include &lt;boost/asio.hpp&gt; #include &lt;sys/prctl.h&gt; int main() { namespace bp = boost::process; namespace ex = bp::extend; system("ls -l /proc/self/fd"); try { boost::asio::io_service ios; bp::child process ("/does/not/exist", ios); process.wait(); } catch (const bp::process_error&amp; e) { // A process_error has been thrown - there is no file /does/not/exist } system("ls -l /proc/self/fd"); } </pre><p> Example output: </p> <pre class="wiki">total 0 lrwx------ 1 hopp hopp 64 Jun 14 12:04 0 -&gt; /dev/pts/3 lrwx------ 1 hopp hopp 64 Jun 14 12:04 1 -&gt; /dev/pts/3 lrwx------ 1 hopp hopp 64 Jun 14 12:04 2 -&gt; /dev/pts/3 lr-x------ 1 hopp hopp 64 Jun 14 12:04 3 -&gt; /proc/19629/fd total 0 lrwx------ 1 hopp hopp 64 Jun 14 12:04 0 -&gt; /dev/pts/3 lrwx------ 1 hopp hopp 64 Jun 14 12:04 1 -&gt; /dev/pts/3 lrwx------ 1 hopp hopp 64 Jun 14 12:04 2 -&gt; /dev/pts/3 lr-x------ 1 hopp hopp 64 Jun 14 12:04 3 -&gt; pipe:[82382] lr-x------ 1 hopp hopp 64 Jun 14 12:04 4 -&gt; /proc/19632/fd </pre><p> The file descriptor leaked by the example is <code>3 -&gt; pipe:[82382]</code>. Is this a bug or am I doing something wrong? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13605 Trac 1.4.3