Boost C++ Libraries: Ticket #13110: cannot wait/join process to actually terminate after calling child::terminate https://svn.boost.org/trac10/ticket/13110 <p> On Windows child::terminate() calls <a class="missing wiki">TerminateProcess</a>, which is asynchronous. I need to wait for the process to actually terminate, but join()/wait() early out because a) _terminated gets set to true and b) the process handle is closed within terminate(). </p> <p> The Unix implementation uses waitpid() after calling kill() to wait for the process state to change, thus the behaviour is different. </p> <p> From MSDN: "<a class="missing wiki">TerminateProcess</a> is asynchronous; it initiates termination and returns immediately. If you need to be sure the process has terminated, call the <a class="missing wiki">WaitForSingleObject</a> function with a handle to the process." </p> <p> Because waiting for a process to actually terminate might take a long time I think it would be best to use a parameter to specify whether terminate() shall wait or not, and allow waiting for the process after calling terminate(). Alternatively please provide a async_terminate() and fix the Windows implementation to wait internally. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13110 Trac 1.4.3