X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4ccb50bf15bbe1f967b1232f2c56695bd6439d6e..92afe9670ecc5246040dad7a9d6b805f9c8f84cb:/src/mc/simgrid_mc.cpp diff --git a/src/mc/simgrid_mc.cpp b/src/mc/simgrid_mc.cpp index 0c8899bbee..71d0388828 100644 --- a/src/mc/simgrid_mc.cpp +++ b/src/mc/simgrid_mc.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include @@ -38,6 +39,10 @@ static const bool trace = true; static int do_child(int socket, char** argv) { XBT_DEBUG("Inside the child process PID=%i", (int) getpid()); + if (prctl(PR_SET_PDEATHSIG, SIGHUP) != 0) { + std::perror("simgrid-mc"); + return MC_SERVER_ERROR; + } int res; // Remove CLOEXEC in order to pass the socket to the exec-ed program: