> On May 17, 2018, 4:21 p.m., Andrew Schwartzmeyer wrote:
> > 3rdparty/stout/include/stout/os/windows/shell.hpp
> > Lines 279-291 (original), 283-306 (patched)
> > <https://reviews.apache.org/r/67201/diff/1/?file=2024990#file2024990line283>
> >
> >     (Old comment: Since the size is `constexpr` (it's always 3), I don't 
> > think we need to malloc on the heap. We can just use `std::array<HANDLE, 
> > 3>`.)
> >     
> >     Actually, I don't think you even need `handle_array` at all. `pipes` is 
> > already a `std::array<int_fd, 3>` (and `int_fd` in this case is `HANDLE`). 
> > You can use the 
> > [data()](http://en.cppreference.com/w/cpp/container/array/data) member of 
> > `std::array` to get access to the underlying `HANDLE[]`.

Oops, I was rushing. `int_fd` is castable to `HANDLE` but is an abstracted data 
type that has another field. So you'd need `std::vector<HANDLE> 
handles(pipes->cbegin(), pipes->cend())` and then pass `handles.data()`. But 
still, allocated automatically with no need to rfree :)


- Andrew


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


On May 17, 2018, 3:18 p.m., Radhika Jandhyala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67201/
> -----------------------------------------------------------
> 
> (Updated May 17, 2018, 3:18 p.m.)
> 
> 
> Review request for mesos and Andrew Schwartzmeyer.
> 
> 
> Bugs: MESOS-8926
>     https://issues.apache.org/jira/browse/MESOS-8926
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Whitelist handles that can be inherited by a child process.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/internal/windows/inherit.hpp 
> 7dbde820e775cbaeb8db4bc4559ab432903e75ea 
>   3rdparty/stout/include/stout/os/windows/shell.hpp 
> 8da612af2888ff4d4d458ea5b16cdb08779b6f4c 
> 
> 
> Diff: https://reviews.apache.org/r/67201/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Radhika Jandhyala
> 
>

Reply via email to