You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 07:24:47 UTC

svn commit: r1131745 - /incubator/mesos/trunk/src/process_based_isolation_module.cpp

Author: benh
Date: Sun Jun  5 05:24:47 2011
New Revision: 1131745

URL: http://svn.apache.org/viewvc?rev=1131745&view=rev
Log:
Updated a perror call to a fatalerror call.

Modified:
    incubator/mesos/trunk/src/process_based_isolation_module.cpp

Modified: incubator/mesos/trunk/src/process_based_isolation_module.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/process_based_isolation_module.cpp?rev=1131745&r1=1131744&r2=1131745&view=diff
==============================================================================
--- incubator/mesos/trunk/src/process_based_isolation_module.cpp (original)
+++ incubator/mesos/trunk/src/process_based_isolation_module.cpp Sun Jun  5 05:24:47 2011
@@ -65,16 +65,16 @@ void ProcessBasedIsolationModule::startE
     PLOG(FATAL) << "Failed to fork to launch new executor";
 
   if (pid) {
-    // In parent process, record the pgid for killpg later.
+    // In parent process, record the gpid for killpg later (the pid is
+    // the gpid because the child does a setsid below).
     LOG(INFO) << "Started executor, OS pid = " << pid;
     pgids[framework->id] = pid;
     framework->executorStatus = "PID: " + lexical_cast<string>(pid);
   } else {
-    // In child process, make cleanup easier.
-    if (setpgid(0, 0) < 0)
-      PLOG(FATAL) << "Failed to put executor in own process group";
-//     if ((pid = setsid()) == -1)
-//       PLOG(FATAL) << "Failed to put executor in own session";
+    // In child process, do setsid to make cleanup easier.
+    // if (setpgid(getpid(), 0) == -1)
+    if ((pid = setsid()) == -1)
+      fatalerror("setsid error");
 
     createExecutorLauncher(framework)->run();
   }