<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Improve lit's ability to kill a process and all its children via a wrapper class"
   href="https://llvm.org/bugs/show_bug.cgi?id=30671">30671</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Improve lit's ability to kill a process and all its children via a wrapper class
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Test Suite
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>lit
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>modocache@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>daniel@zuster.org, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>(This task was copied from
<a href="https://reviews.llvm.org/diffusion/L/browse/llvm/tags/RELEASE_390/final/utils/lit/TODO">https://reviews.llvm.org/diffusion/L/browse/llvm/tags/RELEASE_390/final/utils/lit/TODO</a>.
It was originally written by Daniel Dunbar.)

Introduce a wrapper class that has a ``subprocess.Popen`` like interface but
also supports killing the process and all its children and use this for running
tests.  This would allow us to implement platform specific methods for killing
a process's children which is needed for a per test timeout. On POSIX platforms
we can use process groups and on Windows we can probably use job objects. This
would not only allow us to remove the dependency on the ``psutil`` module but
would also be more reliable as the ``lit.util.killProcessAndChildren()``
function which is currently used is potentially racey (e.g. it might not kill a
fork bomb completely).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>