- simdata->context = xbt_context_new(code, NULL, NULL,
- SIMIX_process_cleanup, process,
- simdata->argc, simdata->argv);
-
+ if (clean_process_function) {
+ simdata->context = xbt_context_new(code, NULL, NULL,
+ clean_process_function, process,
+ simdata->argc, simdata->argv);
+ }
+ else {
+ simdata->context = xbt_context_new(code, NULL, NULL,
+ SIMIX_process_cleanup, process,
+ simdata->argc, simdata->argv);
+ }