I have a python script ["MAIN" script] that uses this line:
# Part 4, create the process and run
cmds = list()
cmds += ['python']
cmds += [script_b]
start = time.time()
p = subprocess.Popen(cmds, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
shell=True)
This process,script_b start another, a third one, script_c.
When i try p.kill() or p.terminate() it does not terminate script_c.
How can i terminate script_b and all its related process from the main script?
Thx
Note: I use it on windows 10. This script runs both on python2.7 and 3.7 if it makes any difference.
Thx