X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/72b259695914c93a27739cad3c186aefbe78a01b..10956ab71f4c1781311d9ab77ee06da26b2e8cf9:/main.cpp?ds=sidebyside diff --git a/main.cpp b/main.cpp index 8a1d5c8..97ab14e 100644 --- a/main.cpp +++ b/main.cpp @@ -171,7 +171,7 @@ static void install_signal_handler() sigemptyset(&action.sa_mask); action.sa_flags = SA_RESTART; if (sigaction(SIGINT, &action, NULL) == -1) { - std::cerr << "sigaction: " << strerror(errno) << "\n"; + std::cerr << "ERROR: sigaction: " << strerror(errno) << "\n"; exit(EXIT_FAILURE_OTHER); } } @@ -274,6 +274,7 @@ int main(int argc, char* argv[]) proc_mutex = new mutex_t(); proc_cond = new condition_t(); + process::set_proc_mutex(proc_mutex); // Launch the MSG simulation. XBT_INFO("Starting simulation at %f...", MSG_get_clock()); @@ -281,6 +282,7 @@ int main(int argc, char* argv[]) simulated_time = MSG_get_clock(); XBT_INFO("Simulation ended at %f.", simulated_time); + process::set_proc_mutex(NULL); delete proc_cond; delete proc_mutex;