X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4bd2cbe6c40e96efdbf49550cc66bb9e35df8b94..36fa571a13985879dc627c70ecc2340af606aa42:/src/mc/Session.cpp diff --git a/src/mc/Session.cpp b/src/mc/Session.cpp index 095d4b05dc..f08f806a6c 100644 --- a/src/mc/Session.cpp +++ b/src/mc/Session.cpp @@ -18,7 +18,7 @@ #include "src/mc/Session.hpp" #include "src/mc/mc_state.h" #include "src/mc/mc_private.h" -#include "src/mc/Checker.hpp" +#include "src/mc/checker/Checker.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_Session, mc, "Model-checker session"); @@ -86,7 +86,7 @@ Session::Session(pid_t pid, int socket) std::unique_ptr process(new simgrid::mc::Process(pid, socket)); // TODO, automatic detection of the config from the process process->privatized( - xbt_cfg_get_boolean("smpi/privatize_global_variables")); + xbt_cfg_get_boolean("smpi/privatize-global-variables")); modelChecker_ = std::unique_ptr( new simgrid::mc::ModelChecker(std::move(process))); xbt_assert(mc_model_checker == nullptr); @@ -143,7 +143,7 @@ Session* Session::fork(std::function code) if (res == -1) throw simgrid::xbt::errno_error("Could not create socketpair"); - pid_t pid = do_fork([&] { + pid_t pid = do_fork([sockets, &code] { ::close(sockets[1]); setup_child_environment(sockets[0]); code(); @@ -159,16 +159,16 @@ Session* Session::fork(std::function code) // static Session* Session::spawnv(const char *path, char *const argv[]) { - return Session::fork([&] { + return Session::fork([path, argv] { execv(path, argv); }); } // static -Session* Session::spawnvp(const char *path, char *const argv[]) +Session* Session::spawnvp(const char *file, char *const argv[]) { - return Session::fork([&] { - execvp(path, argv); + return Session::fork([file, argv] { + execvp(file, argv); }); }