gdal2tiles_parallel.py: script does not exit cleanly during multiprocessing
stevendlander opened this issue · 1 comments
Since gdal2tiles_parallel.py script utilizes multiprocessing, it does not exit cleanly when interrupted. For example, if Ctrl+D (KeyboardInterrupt) while the script is executing, it will not completely stop but instead produce profuse error messages. To kill the process, close the terminal windows on Windows or, on Linux, send the process to the background (Ctrl+Z) then kill the job with kill -9 $(jobs -p).
The correct approach to handle exiting the script during a tile job would be to send a killall signal to all running processes and exit cleanly.
http://stackoverflow.com/questions/1231599/python-multiprocessing-exit-elegantly-how
Refactor multiprocessing to a class-based solution should allow for clean exits.