Used atexit to automatically cleanup processes in case of unexpected exit (makes the code a bit more robust).
Created a clean_process() helper function to improve readability and to report if processes weren't cleaned.
Got rid of the custom Waiter class by using Popen.wait(timeout).
Used atexit to automatically cleanup processes in case of unexpected exit (makes the code a bit more robust). Created a clean_process() helper function to improve readability and to report if processes weren't cleaned. Got rid of the custom Waiter class by using Popen.wait(timeout).