This is a pretty myopic view of things? There are lots of other things you might wish to do when the program terminates besides releasing resources...
Anything the kernel does not do on program exit, which is most things.
This was actually my main reason for using C++ to program the control software: the fact that constructors and destructors run deterministically, especially when something bad happens and an exception is thrown. And while the language doesn't specify in which order they run for global variables in different compilation units, you still know how they are ordered with respect to `main()`, and if you pay attention to how the linker works, you can actually know how they will all be ordered.
Also... can't you make that argument for anything? "Avoid unique_ptr -- can't you just free the memory before exiting?"
Guard g;
// ...call subprocess...
// Guard::~Guard will run at exitedit: to clarify, I'm not dogmatic, I have nothing against implmenting clean shutdown procedures for example to avoid alerts and allow quick restarts that don't need to roll-forward replay logs.
I just think that clean shutdown should be best-effort and never required for consistency/durability/safety.
We are probably in agreement.
Of course, I wouldn't put that clean up in an atexit.