From: degomme Date: Tue, 9 Feb 2016 14:57:48 +0000 (+0100) Subject: Sometimes (ubuntu 15.10 for us) sighup was blocked and made the following line useless. X-Git-Tag: v3_13~899^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e31f500b4a0e990cb93efdc122551375ae228172?ds=inline Sometimes (ubuntu 15.10 for us) sighup was blocked and made the following line useless. Make sure we unblock all signals. --- diff --git a/src/mc/simgrid_mc.cpp b/src/mc/simgrid_mc.cpp index a923cdbcea..fb5a2b30ad 100644 --- a/src/mc/simgrid_mc.cpp +++ b/src/mc/simgrid_mc.cpp @@ -45,6 +45,15 @@ static int do_child(int socket, char** argv) #ifdef __linux__ // Make sure we do not outlive our parent: + sigset_t mask; + sigset_t orig_mask; + + sigemptyset (&mask); + if (sigprocmask(SIG_BLOCK, &mask, &orig_mask) < 0) { + std::perror ("sigprocmask"); + return SIMGRID_MC_EXIT_ERROR; + } + if (prctl(PR_SET_PDEATHSIG, SIGHUP) != 0) { std::perror("simgrid-mc"); return SIMGRID_MC_EXIT_ERROR;