Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix bug related to the exception mechanism once the context module exits
[simgrid.git] / src / simix / smx_context_sysv.c
index f0bd8aa..3baf8f2 100644 (file)
@@ -92,9 +92,13 @@ void SIMIX_ctx_sysv_factory_init(smx_context_factory_t *factory)
 
 static int smx_ctx_sysv_factory_finalize(smx_context_factory_t * factory)
 {
-  /*FIXME free(maestro_context->exception);*/
   free(*factory);
   *factory = NULL;
+
+  /* Restore the default exception setup */
+  __xbt_ex_ctx = &__xbt_ex_ctx_default;
+  __xbt_ex_terminate = &__xbt_ex_terminate_default;
+
   return 0;
 }