X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/240142886b3f15fb719d2b74c680d3282072f6c9..4f0921c868b916da79370ef6ba03d368be06a6e3:/src/simix/smx_global.c?ds=sidebyside diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index 25882af65f..3b92c94667 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -5,6 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include +#include #include "smx_private.h" #include "xbt/heap.h" @@ -226,9 +227,14 @@ void SIMIX_global_init(int *argc, char **argv) // We need to communicate initialization of the different layers to the model-checker. if (mc_mode == MC_MODE_NONE) { if (getenv(MC_ENV_SOCKET_FD)) { + mc_mode = MC_MODE_CLIENT; MC_client_init(); - MC_client_hello(); + + // Waiting for the model-checker: + if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) == -1 || raise(SIGSTOP) != 0) + xbt_die("Could not wait for the model-checker"); + MC_client_handle_messages(); } }