def snuff(subprocs):
 for proc in subprocs:
  if (proc.poll() is None):
   os.kill(proc.pid, signal.SIGKILL)
   proc.wait()

def snuff ( subprocs ) : for proc in subprocs : if ( proc . poll ( ) is None ) : os . kill ( proc . pid , signal . SIGKILL ) proc . wait ( )
helper for killing off remaining live subprocesses .