I do have a program that runs 2 functions at the same time in different Shell windows.
How can I stop all functions running if one of them finish the execution?
'''
import multiprocessing
import subprocess
def startp1():
subprocess.call('python teste.py', creationflags=subprocess.CREATE_NEW_CONSOLE)
def startp2():
subprocess.call('python teste2.py', creationflags=subprocess.CREATE_NEW_CONSOLE)
if __name__ == '__main__':
p1 = multiprocessing.Process(target=startp1)
p2 = multiprocessing.Process(target=startp2)
p1.start()
p2.start()
'''