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 2012/08/01 00:29:58 UTC

svn commit: r1367806 - /incubator/mesos/trunk/src/exec/exec.cpp

Author: benh
Date: Tue Jul 31 22:29:57 2012
New Revision: 1367806

URL: http://svn.apache.org/viewvc?rev=1367806&view=rev
Log:
Handle race delivering signals via killpg when the executor is
abnormally getting killed (contributed by Vinod Kone).

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

Modified: incubator/mesos/trunk/src/exec/exec.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/exec/exec.cpp?rev=1367806&r1=1367805&r2=1367806&view=diff
==============================================================================
--- incubator/mesos/trunk/src/exec/exec.cpp (original)
+++ incubator/mesos/trunk/src/exec/exec.cpp Tue Jul 31 22:29:57 2012
@@ -71,7 +71,11 @@ protected:
     // TODO(vinod): Invoke killtree without killing ourselves.
     // Kill the process group (including ourself).
     killpg(0, SIGKILL);
-    LOG(FATAL) << "ERROR! Killing process group"; // We should never come here.
+
+    // The signal might not get delivered immediately, so sleep for a
+    // few seconds. Worst case scenario, exit abnormally.
+    sleep(5);
+    exit(-1);
   }
 };