The on_exit() function is non-portable and is not available
in all environments (notably Linux environments running on MUSL
and Solaris based environments). Thus, the function call is
swapped for the portable atexit() call.
global_tmp_out_repo = NULL;
// Register on exit cleanup function
- if (on_exit(failure_exit_cleanup, NULL))
+ if (atexit(failure_exit_cleanup))
g_warning("Cannot set exit cleanup function by atexit()");
// Prepare signal handler configuration
/**
* This function does:
- * 1) Sets on_exit cleanup function that removes temporary directories
+ * 1) Sets atexit cleanup function that removes temporary directories
* 2) Sets a signal handler for signals that lead to process temination.
* (List obtained from the "man 7 signal")
* Signals that are ignored (SIGCHILD) or lead just to stop (SIGSTOP, ...)