Return-Path: X-Original-To: apmail-mesos-dev-archive@www.apache.org Delivered-To: apmail-mesos-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B461817CE6 for ; Fri, 3 Apr 2015 01:42:03 +0000 (UTC) Received: (qmail 58893 invoked by uid 500); 3 Apr 2015 01:42:03 -0000 Delivered-To: apmail-mesos-dev-archive@mesos.apache.org Received: (qmail 58828 invoked by uid 500); 3 Apr 2015 01:42:03 -0000 Mailing-List: contact dev-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list dev@mesos.apache.org Received: (qmail 58813 invoked by uid 99); 3 Apr 2015 01:42:03 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2015 01:42:03 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id C71191D70AA; Fri, 3 Apr 2015 01:42:00 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3292938500171655572==" MIME-Version: 1.0 Subject: Review Request 32805: Terminated the perf subprocess once the parent exits. From: "Jie Yu" To: "Vinod Kone" , "Ben Mahler" , "Ian Downes" Cc: "Jie Yu" , "mesos" Date: Fri, 03 Apr 2015 01:42:00 -0000 Message-ID: <20150403014200.16791.65976@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Jie Yu" X-ReviewGroup: mesos X-ReviewRequest-URL: https://reviews.apache.org/r/32805/ X-Sender: "Jie Yu" Reply-To: "Jie Yu" X-ReviewRequest-Repository: mesos --===============3292938500171655572== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32805/ ----------------------------------------------------------- Review request for mesos, Ben Mahler, Ian Downes, and Vinod Kone. Bugs: MESOS-2462 https://issues.apache.org/jira/browse/MESOS-2462 Repository: mesos Description ------- Terminated the perf subprocess once the parent exits. The idea is to have a nanny process which installs a SIGTERM handler which will kill the process group (of course, we need to put the nanny and perf process to the same process group). We set the death signal of the nanny process to be SIGTERM. In that way, when slave exits, the nanny process will receive a SIGTERM, which will then kill all processes in the process group. Diffs ----- src/linux/perf.cpp cad6c80e2a9608ff02fc2b8976efba52713dd5a8 Diff: https://reviews.apache.org/r/32805/diff/ Testing ------- sudo make check I also manually verified it by terminating the slave while perf is in progress. The perf is killed immediately. Thanks, Jie Yu --===============3292938500171655572==--