From reviews-return-30442-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Fri Apr 8 23:06:50 2016 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 C33D3190CF for ; Fri, 8 Apr 2016 23:06:50 +0000 (UTC) Received: (qmail 70733 invoked by uid 500); 8 Apr 2016 23:06:50 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 70705 invoked by uid 500); 8 Apr 2016 23:06:50 -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 70683 invoked by uid 99); 8 Apr 2016 23:06:50 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2016 23:06:50 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 5584E2AEE5E; Fri, 8 Apr 2016 23:06:47 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1684644199030123994==" MIME-Version: 1.0 Subject: Re: Review Request 45888: Stout: Implemented `os::setenv` on Windows. From: Michael Park To: M Lawindi , Alex Naparu , Michael Park , Joris Van Remoortere , Artem Harutyunyan , Daniel Pravat , Yi Sun Cc: mesos , Alex Clemmer Date: Fri, 08 Apr 2016 23:06:47 -0000 Message-ID: <20160408230647.20106.27993@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Michael Park X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/45888/ X-Sender: Michael Park X-ReviewBoard-ShipIt: 1 References: <20160407193159.20106.17499@reviews.apache.org> In-Reply-To: <20160407193159.20106.17499@reviews.apache.org> Reply-To: Michael Park X-ReviewRequest-Repository: mesos --===============1684644199030123994== 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/45888/#review127915 ----------------------------------------------------------- Fix it, then Ship it! 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (lines 56 - 68) How about: ``` // Do not set the variable if already set and `overwrite` was not specified. // // Per MSDN[1], `GetEnvironmentVariable` returns 0 on error and sets the // error code to `ERROR_ENVVAR_NOT_FOUND` if the variable was not found. // // [1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms683188(v=vs.85).aspx if (!overwrite && ::GetEnvironmentVariable(key.c_str(), NULL, 0) != 0 && ::GetLastError() == ERROR_ENVVAR_NOT_FOUND) { return; } ``` - Michael Park On April 7, 2016, 7:31 p.m., Alex Clemmer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45888/ > ----------------------------------------------------------- > > (Updated April 7, 2016, 7:31 p.m.) > > > Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun. > > > Repository: mesos > > > Description > ------- > > Stout: Implemented `os::setenv` on Windows. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 6a391ff198ab724f689bcef79d4e2e05a786cbc2 > > Diff: https://reviews.apache.org/r/45888/diff/ > > > Testing > ------- > > > Thanks, > > Alex Clemmer > > --===============1684644199030123994==--