Return-Path: X-Original-To: apmail-incubator-mesos-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-mesos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B1F4F67F for ; Thu, 25 Apr 2013 20:42:45 +0000 (UTC) Received: (qmail 53186 invoked by uid 500); 25 Apr 2013 20:42:45 -0000 Delivered-To: apmail-incubator-mesos-dev-archive@incubator.apache.org Received: (qmail 53155 invoked by uid 500); 25 Apr 2013 20:42:45 -0000 Mailing-List: contact mesos-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mesos-dev@incubator.apache.org Delivered-To: mailing list mesos-dev@incubator.apache.org Received: (qmail 53147 invoked by uid 99); 25 Apr 2013 20:42:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2013 20:42:45 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of benjamin.mahler@gmail.com designates 209.85.212.41 as permitted sender) Received: from [209.85.212.41] (HELO mail-vb0-f41.google.com) (209.85.212.41) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2013 20:42:39 +0000 Received: by mail-vb0-f41.google.com with SMTP id f12so1063319vbg.0 for ; Thu, 25 Apr 2013 13:42:18 -0700 (PDT) X-Received: by 10.58.214.231 with SMTP id od7mr27932462vec.44.1366922538004; Thu, 25 Apr 2013 13:42:18 -0700 (PDT) Received: from mail-vb0-x22a.google.com (mail-vb0-x22a.google.com [2607:f8b0:400c:c02::22a]) by mx.google.com with ESMTPSA id tp10sm2474903vec.1.2013.04.25.13.42.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Apr 2013 13:42:17 -0700 (PDT) Received: by mail-vb0-f42.google.com with SMTP id p12so3060146vbe.1 for ; Thu, 25 Apr 2013 13:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=HjbbnTh04rOtTLL7qwRIF0H6OSOn2IiNADmaaBEg/30=; b=PPIMUTw1Aq15tF7WM5CmvUPSITAztwfZpqWC2cS/E7Z/tGxA909VxAuOseG49T969P Of7BZ7hGZRxcF81XWJMs2WK49CJ43+5u/PZXmQ2WTUt0RpNMuWhA1t8sATW3wkMA1qrh XCnqXjhEdGks2j31OBkJEjjG+7EXxV4T/U/a/yFJ4o5YRuQwPykcaaZChLZ4KTSfhper ey8gL93EsDa/EEKBxZEXlEyl4aQO9ZYhsrTAnCdnFzbHYQAhcFs0XeUUb22r7GFoDHNq YGHEKlbPfiHZtgR+oZKPsQYWWbOcVC1savWxU0GLEi4GpjViZWlvaOwbTIZumstp9ZZ3 qoNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:x-gm-message-state; bh=HjbbnTh04rOtTLL7qwRIF0H6OSOn2IiNADmaaBEg/30=; b=BVcVobi6yLVyPpCyICj2Og5EeoBNEur/7NAm9euPGNCggSCF4+RgY3c9wQ6TmCJrMQ /N5MovCRVZ2M5rRAMJvVVqZI8ujTgiPkPAmUCZWCFb7PWRNLeq9zy8bP9fyqpCR+VgeY +fJ0BvL6w1B5v1bK+7aO1jyfhur8kyv6NrymSn46IMFEkGsXt3jRlVzbmaIr8reXCwkd DJQFTugRiDCK0BSNO4SFMFtnWR1Tve5B/p5QHV7AOLV3bXXKN3NM2CgpqFxe5A3V5SB2 CYlVEd4w/lfdoqgpsi6Ibg8hUN1dRaCNZ1VSe26Skrhk1OtlecYLZLJ/yPSpnajuzLWp 1wIg== X-Received: by 10.220.52.201 with SMTP id j9mr27788154vcg.33.1366922536577; Thu, 25 Apr 2013 13:42:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.168.5 with HTTP; Thu, 25 Apr 2013 13:41:55 -0700 (PDT) In-Reply-To: <9C09F23C-87E0-48DC-AEA4-6EAB6341BC10@gmail.com> References: <9C09F23C-87E0-48DC-AEA4-6EAB6341BC10@gmail.com> From: Benjamin Mahler Date: Thu, 25 Apr 2013 13:41:55 -0700 Message-ID: Subject: Re: Reaper related changes To: Benjamin Hindman Cc: Benjamin Mahler , Yan Xu , Vinod Kone , "mesos-dev@incubator.apache.org" Content-Type: multipart/alternative; boundary=001a11c2bd123a85ef04db3574cb X-Gm-Message-State: ALoCoQnDFaMd0wkLBCIVHZt6eJgxxXdeKAw0NOsy1KSpWKWJ4QJE7TIAWr7Vzg2F1yqfND+zR0N6 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2bd123a85ef04db3574cb Content-Type: text/plain; charset=ISO-8859-1 Ok so linux/proc.hpp currently has: Try > pids(); Try > children(pid_t pid, bool recursive = true); Try status(pid_t pid); We want these to work for OSX as well for now. Say we move linux/proc.{cpp,hpp} into stout/proc.hpp, then we can move alive into os and fail the compilation if anyone includes stout/proc.hpp without __linux__ defined. We'll also want os::pids(), os::children(pid_t) and os::status(pid_t) for non-linux systems. I originally wanted to have these call into stout/proc.hpp for linux, but that introduces a circular dependency. On Thu, Apr 25, 2013 at 11:51 AM, Benjamin Hindman < benjamin.hindman@gmail.com> wrote: > I like os:: a lot. I think the type signature (i.e., taking a pid_t) is > sufficient for disambiguation. > > > > > > On Apr 25, 2013, at 11:43 AM, Benjamin Mahler > wrote: > > We also have a src/common/process_utils.hpp which contains only > mesos::internal::utils::process::killtree() at the moment. > > > On Thu, Apr 25, 2013 at 11:37 AM, Yan Xu wrote: > >> I guess os:: is fine, but in a separate file? >> >> -- >> Jiang Yan Xu @xujyan >> >> >> On Thu, Apr 25, 2013 at 11:29 AM, Vinod Kone wrote: >> >>> I don't like process:: because it conflicts with the libprocess >>> namespace as you mentioned. >>> >>> I still like proc:: but clearly BenH doesn't like it. I'm ok with os:: >>> namespace. >>> >>> >>> @vinodkone >>> >>> >>> On Thu, Apr 25, 2013 at 11:19 AM, Benjamin Mahler < >>> benjamin.mahler@gmail.com> wrote: >>> >>>> Is there any consensus on how to place process utilities in stout? I >>>> would expect this to be in a process:: namespace but of course that is >>>> confusing because we use libprocess, which should perhaps have a >>>> libprocess:: namespace instead.. >>>> >>>> I'll be moving process utilities etc into stout, hopefully with the >>>> same calls for linux and OSX but I'm not yet certain if that is possible. I >>>> would like to place these in a process.hpp file inside a process:: >>>> namespace. >>>> >>>> I think these read very nicely: >>>> process::alive(pid_t) >>>> process::children(pid_t) >>>> process::stat(pid_t) >>>> >>>> Thoughts? >>>> >>>> >>>> On Tue, Apr 23, 2013 at 6:29 PM, Yan Xu wrote: >>>> >>>>> This batch of commits changed the reaper to use "Future" as the >>>>> notification mechanism. >>>>> >>>>> Sequence: >>>>> https://reviews.apache.org/r/10744/ >>>>> https://reviews.apache.org/r/10745/ >>>>> https://reviews.apache.org/r/10746/ >>>>> https://reviews.apache.org/r/10747/ >>>>> >>>>> Best, >>>>> Yan >>>>> -- >>>>> Jiang Yan Xu @xujyan >>>>> >>>> >>>> >>> >> > --001a11c2bd123a85ef04db3574cb--