Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B69C717600 for ; Thu, 20 Aug 2015 07:39:47 +0000 (UTC) Received: (qmail 37528 invoked by uid 500); 20 Aug 2015 07:39:47 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 37505 invoked by uid 500); 20 Aug 2015 07:39:47 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 37488 invoked by uid 99); 20 Aug 2015 07:39:47 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2015 07:39:47 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id B04C71DB5F4; Thu, 20 Aug 2015 07:39:46 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4227129088494671889==" MIME-Version: 1.0 Subject: Re: Review Request 37336: [WIP] Added `wait()` method to process::Subprocess From: "Marco Massenzio" To: "Joris Van Remoortere" Cc: "Ben Mahler" , "Marco Massenzio" , "mesos" Date: Thu, 20 Aug 2015 07:39:46 -0000 Message-ID: <20150820073946.29970.33161@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Marco Massenzio" X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/37336/ X-Sender: "Marco Massenzio" References: <20150817230148.24997.70513@reviews.apache.org> In-Reply-To: <20150817230148.24997.70513@reviews.apache.org> Reply-To: "Marco Massenzio" X-ReviewRequest-Repository: mesos --===============4227129088494671889== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Aug. 17, 2015, 11:01 p.m., Ben Mahler wrote: > > In the same vein as os::shell, we should probably introduce an 'os' namespace in libprocess for asynchronous os utilities. In this case, process::os::shell which returns a Future of the output (although, ideally ). Sounds good. If I understand this correctly, the `process::os::shell` would take advantage of this refactoring, correct? (also, how about returning a `Future`: this has all of and a bit more). Could you please take a look at the next revision I'm about to post: it now all works and passes the tests, but I'm somewhat confused as to why the `onFailed` never got called and another nit - they are marked as FIXME(marco) and will be obviously removed - I needed a way to mark those areas visibly: they are not TODOs). Thanks! - Marco ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37336/#review95658 ----------------------------------------------------------- On Aug. 15, 2015, 2:02 a.m., Marco Massenzio wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37336/ > ----------------------------------------------------------- > > (Updated Aug. 15, 2015, 2:02 a.m.) > > > Review request for mesos and Joris Van Remoortere. > > > Bugs: MESOS-3035 > https://issues.apache.org/jira/browse/MESOS-3035 > > > Repository: mesos > > > Description > ------- > > Jira: MESOS-3035 > > The original API for `process::Subprocess` still left a lot of legwork > to do for the caller; we have now added a `wait(Duration timeout)` method > that returns a `CommandResult` (also introduced with this patch) which > contains useful information about the command invocation; the exit code; > stdout and, optionally, stderr too. > > The `wait()` method will wait for both the process to terminate, and > stdout/stderr to be available to read from; it also "unpacks" them into > ready-to-use `string`s. > > This is still WIP as I'm seeing some unusual behavior and I'd like to discuss with someone more expert on libprocess. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/subprocess.hpp 310cb4f8e4e2faa5545dffd196d7490c868bc5d6 > 3rdparty/libprocess/src/subprocess.cpp d6ea62ed1c914d34e0e189395831c86fff8aac22 > 3rdparty/libprocess/src/tests/subprocess_tests.cpp ab7515325e5db0a4fd222bb982f51243d7b7e39d > > Diff: https://reviews.apache.org/r/37336/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Marco Massenzio > > --===============4227129088494671889==--