-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19162/#review39360
-----------------------------------------------------------

Ship it!


Great cleanup with os::environment.


3rdparty/libprocess/include/process/subprocess.hpp
<https://reviews.apache.org/r/19162/#comment71726>

    Please add a short comment that explains that the environment is combined 
with the current environment (overriding as necessary) since by default doing 
an exec*e only uses the environment that one passes. You could even consider 
adding a TODO to differentiate this case.



3rdparty/libprocess/src/subprocess.cpp
<https://reviews.apache.org/r/19162/#comment71728>

    Might as well initialize size to 0 too!



3rdparty/libprocess/src/subprocess.cpp
<https://reviews.apache.org/r/19162/#comment71722>

    Minor cleanup, but let's name the constructor argument '_environment' to 
match style in codebase and then s/environ/environment/ please.



3rdparty/libprocess/src/subprocess.cpp
<https://reviews.apache.org/r/19162/#comment71724>

    Won't you get the '\0' copied for free if you copy 'entry.size() + 1' since 
you did 'entry.c_str()'?



3rdparty/libprocess/src/tests/subprocess_tests.cpp
<https://reviews.apache.org/r/19162/#comment71729>

    Newline here please.



3rdparty/libprocess/src/tests/subprocess_tests.cpp
<https://reviews.apache.org/r/19162/#comment71731>

    I'm not sure what you mean by "override OS" but calling this just 
'environmentOverride' is probably sufficient.



3rdparty/libprocess/src/tests/subprocess_tests.cpp
<https://reviews.apache.org/r/19162/#comment71733>

    // Make sure we override an existing environment variable.
    os::setenv("MESSAGE", "hello");
    
    map<string, string> environment;
    environment["MESSAGE"] = "goodbye";


- Benjamin Hindman


On April 2, 2014, 8:44 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19162/
> -----------------------------------------------------------
> 
> (Updated April 2, 2014, 8:44 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Bugs: MESOS-995
>     https://issues.apache.org/jira/browse/MESOS-995
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/subprocess.hpp 
> 75b2a96b3ca62a4a59e64aba046f1d797bd8ebf6 
>   3rdparty/libprocess/src/subprocess.cpp PRE-CREATION 
>   3rdparty/libprocess/src/tests/subprocess_tests.cpp 
> d15d4d159105474117c4ea432b215431209ab539 
> 
> Diff: https://reviews.apache.org/r/19162/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>

Reply via email to