I have some code like this
import multiprocessing as mp
processes = []
for i in range(10):
p = mp.Process(target=my_func, args=args)
processes.append(p)
p.start()
for p in processes:
p.join()
If there is a bug in my_func
that causes all the threads to crash, then I want my parent process to detect that and also throw an exception. How can I detect if the process exited cleanly when I join the processes?