for child in parent.get_children(recursive=True):
    child.kill()
if including_parent:
    parent.kill()
me = os.getpid()
kill_proc_tree(me)
Auto kill process and child process of multiprocessing Pool