X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7d5154294d0c97a3690134cc5d3a9900189055cf..6ae5ae138e9dd397b95d9e7741a5b28f194705d0:/src/mc/remote/Client.cpp diff --git a/src/mc/remote/Client.cpp b/src/mc/remote/Client.cpp index 4e774042b2..4a9f0bf79c 100644 --- a/src/mc/remote/Client.cpp +++ b/src/mc/remote/Client.cpp @@ -6,11 +6,10 @@ #include "src/mc/remote/Client.hpp" #include "src/internal_config.h" #include +#include -#include #include #include -#include #include #include @@ -57,16 +56,8 @@ Client* Client::initialize() instance_.reset(new simgrid::mc::Client(fd)); // Wait for the model-checker: - errno = 0; -#if defined __linux__ - ptrace(PTRACE_TRACEME, 0, nullptr, nullptr); -#elif defined BSD - ptrace(PT_TRACE_ME, 0, nullptr, 0); -#else -#error "no ptrace equivalent coded for this platform" -#endif - if (errno != 0 || raise(SIGSTOP) != 0) - xbt_die("Could not wait for the model-checker (errno = %d: %s)", errno, strerror(errno)); + if (raise(SIGSTOP) != 0) + throw simgrid::xbt::errno_error("Could not wait for the model-checker"); instance_->handle_messages(); return instance_.get();