int adios_read_icee_finalize_method () { log_debug("%s\n", __FUNCTION__); if (adios_read_icee_initialized) { int i; if (is_read_cm_passive == 1) for (i = 0; i < num_remote_server; i++) CManager_close(pcm[i]); else for (i=0; i<icee_read_num_parallel; i++) CManager_close(icee_read_cm[i]); adios_read_icee_initialized = 0; } return 0; }
static void cleanup_handler(int dummy, siginfo_t *siginfo, void* context){ log_info("Cleanup Called"); log_info("Sending PID: %ld, UID: %ld\n", (long)siginfo->si_pid, (long)siginfo->si_uid); measurements_cleanup(); //CMsleep(cm, 10); /* service network for 600 seconds */ CManager_close(cm); log_info("Closed the CManager"); cleanup_python(); PyRun_SimpleString("import gc"); PyRun_SimpleString("gc.collect()"); log_info("Stop Python"); Py_Finalize(); redis_destroy(); log_info("Shut down redis"); exit(0); }