Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Really unblock the signal in the child
authorGabriel Corona <gabriel.corona@enst-bretagne.fr>
Tue, 9 Feb 2016 22:46:25 +0000 (23:46 +0100)
committerGabriel Corona <gabriel.corona@enst-bretagne.fr>
Tue, 9 Feb 2016 22:46:39 +0000 (23:46 +0100)
src/mc/simgrid_mc.cpp

index fb5a2b3..4b307b3 100644 (file)
@@ -46,10 +46,8 @@ static int do_child(int socket, char** argv)
 #ifdef __linux__
   // Make sure we do not outlive our parent:
   sigset_t mask;
 #ifdef __linux__
   // Make sure we do not outlive our parent:
   sigset_t mask;
-  sigset_t orig_mask;
-
   sigemptyset (&mask);
   sigemptyset (&mask);
-  if (sigprocmask(SIG_BLOCK, &mask, &orig_mask) < 0) {
+  if (sigprocmask(SIG_SETMASK, &mask, nullptr) < 0) {
     std::perror ("sigprocmask");
     return SIMGRID_MC_EXIT_ERROR;
   }
     std::perror ("sigprocmask");
     return SIMGRID_MC_EXIT_ERROR;
   }