title: Removing a zombie process
body: <p>I have a use case where I have a process which is <code>parent</code> process and it spawns various <code>child</code> processes which monitors an <code>ssh</code> connection each. This <code>parent</code> process should run endlessly as a part of a service. But, when one of these <code>ssh</code> connection is closed, then that <code>child</code> process becomes a <code>zombie</code> process. This way there are many <code>zombie</code>  processes being created each time a <code>ssh</code> connection is closed. </p>
  
  <p>I want to keep the number of <code>zombie</code> processes as minimal as possible. As far as I know, <code>SIGTERM</code> or <code>SIGKILL</code> does remove a <code>zombie</code> process. Since the <code>parent</code> process runs endlessly the <code>zombie</code> process cannot be removed by waiting for the <code>parent</code> to terminate.</p>
  
  <p>Is there any way to remove the zombie process? Or something that I have understood wrong?  </p>