def kill_processtree(pid, signum):
 family_pids = get_processtree_pids(pid)
 for _pid in family_pids:
  os.kill(_pid, signum)

def kill_processtree ( pid , signum ) : family_pids = get_processtree_pids ( pid ) for _pid in family_pids : os . kill ( _pid , signum )
kill a process and all its descendants .