> On April 3, 2014, 7:32 p.m., Dominic Hamon wrote:
> > 3rdparty/libprocess/src/subprocess.cpp, line 141
> > <https://reviews.apache.org/r/19259/diff/3/?file=548212#file548212line141>
> >
> >     Change Envp to take an Option<map> and skip the loop over the passed in 
> > map if it's None()?

I think it's fine to just do:

internal::Envp envp(environment.get(map<string, string>()));

As it captures the current semantics. We could add a TODO to optimize Envp to 
not generate the environment for empty maps (or better a None) , but I'm happy 
to just make that a TODO now and optimize later.


> On April 3, 2014, 7:32 p.m., Dominic Hamon wrote:
> > 3rdparty/libprocess/src/subprocess.cpp, lines 179-189
> > <https://reviews.apache.org/r/19259/diff/3/?file=548212#file548212line179>
> >
> >     this isn't 'setup && command' as documented. If it was, we wouldn't run 
> > command if setup returned non-zero.

Yes, see my comments re: using _exit.


> On April 3, 2014, 7:32 p.m., Dominic Hamon wrote:
> > 3rdparty/libprocess/include/process/subprocess.hpp, line 79
> > <https://reviews.apache.org/r/19259/diff/2/?file=520575#file520575line79>
> >
> >     It just feels a little restrictive, in that I might want to pass 
> > arguments.

Since 'subprocess' will never be passing arguments to the function taking 
'void' is fine, you can bind your own arguments as his tests show.


- Benjamin


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


On April 3, 2014, 7:23 p.m., Till Toenshoff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19259/
> -----------------------------------------------------------
> 
> (Updated April 3, 2014, 7:23 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Dominic Hamon, and Ian Downes.
> 
> 
> Bugs: MESOS-1102
>     https://issues.apache.org/jira/browse/MESOS-1102
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Adds the ability to process::subprocess to run a function (lambda) within the 
> child context, after fork and before exec.
> 
> NOTE: Such lambda must not contain any async unsafe code. For details on 
> async safety, see POSIX.1-2004 on async-signal-safe functions, also 
> referenced in the signal man-pages: 
> http://man7.org/linux/man-pages/man7/signal.7.html.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/subprocess.hpp 6c51c0b 
>   3rdparty/libprocess/src/subprocess.cpp e09c808 
>   3rdparty/libprocess/src/tests/subprocess_tests.cpp 9413ecc 
> 
> Diff: https://reviews.apache.org/r/19259/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Till Toenshoff
> 
>

Reply via email to