I am using multiprocessing module for parallel processing. Bellow code snippet search the string filename in X location and return the file name where the string found. But in s
I am able to solve my Issue using psutil module
Found solution on bellow post:
import psutil, os
def kill_proc_tree(pid, including_parent=True):
parent = psutil.Process(pid)
for child in parent.get_children(recursive=True):
child.kill()
if including_parent:
parent.kill()
me = os.getpid()
kill_proc_tree(me)
https://stackoverflow.com/a/4229404/420557