Looks good except for one more general question. There seems to be a lot of exit(EXIT_FAILURE) which bypasses all resource cleanup operations. Basic OS resources (memory, open files, etc) are not a big deal as they will be cleaned up on exit, but we do use temp files and some external libraries/tools that may also have some temporary resources left behind if not de-initialized/shut down cleanly. Should we consider a new blueprint to implement a better cleanup on error?
Looks good except for one more general question. There seems to be a lot of exit(EXIT_FAILURE) which bypasses all resource cleanup operations. Basic OS resources (memory, open files, etc) are not a big deal as they will be cleaned up on exit, but we do use temp files and some external libraries/tools that may also have some temporary resources left behind if not de-initialized/shut down cleanly. Should we consider a new blueprint to implement a better cleanup on error?