If reshape (eg. chunksize migration) is gracefully stopped via SIGTERM the checkpoint is not saved and reshape cannot be resumed due to "data being present in copy area". This is because UNIT_SRC_NORMAL isn't set if SIGTERM occured.
Move SIGTERM handling at the end of the loop to allow saving checkpoint (and state) so reshapes can be properly resumed.
If reshape (eg. chunksize migration) is gracefully stopped via SIGTERM the checkpoint is not saved and reshape cannot be resumed due to "data being present in copy area". This is because UNIT_SRC_NORMAL isn't set if SIGTERM occured.
Move SIGTERM handling at the end of the loop to allow saving checkpoint (and state) so reshapes can be properly resumed.