When we use- os._exit(<num>) ::
Exit the process with status n, without calling cleanup handlers, flushing stdio buffers, etc.
and that sys.exit() ::
“only” raises an exception, it will only exit the process when called from the main thread
Now, how do I close a multi-processed application that will ensure all processes are closed (none left orphaned) and that it exits in the best state possible?
Also, I am creating the processes using the python multiprocessing library, by creating classes which inherit from multiprocessing Process.