The problem is that CAF_EXIT does _exit() internally (don't ask me
why) which bypasses all registered exit handlers including
libgfortran's destructor (cleanup in runtime/main.c). This seems to
cause problems with Fortran IO: I tried all sorts of fflushes, fsyncs
and sleeps in CAF_EXIT but neither of them makes libgfortran print
it's internal buffers.
Is there any way to workaround this i.e. to ask libgfortran to flush
(from C program)? I know about `call flush()' and environment
variables but these really solve different problems and would not be
useful in CAF's case