def _terminate(self, pid):
procs = Process(pid).children()
for p in procs:
p.terminate()
gone, still_alive = wait_procs(procs, timeout=1,
callback=self._on_terminate)
for p in still_alive:
p.kill()