> On Feb. 6, 2018, 1:55 p.m., Joseph Wu wrote:
> > 3rdparty/stout/include/stout/internal/windows/inherit.hpp
> > Lines 31-43 (patched)
> > <https://reviews.apache.org/r/65467/diff/1/?file=1951450#file1951450line31>
> >
> >     This is basically what the ChildHook `UNSET_CLOEXEC` 
> > (libprocess/src/subprocess.cpp) should be doing.
> 
> Andrew Schwartzmeyer wrote:
>     Pretty much, but we don't have any child hook support on Windows 
> whatsoever. Adding support for child hooks would be a non-trivial undertaking 
> (we don't have a pseudo-program written to run child hooks and launch a 
> process like on Linux, we're just launching the process directly).

Hum... on second though, there appears to be no equivalent for a 
`UNSET_CLOEXEC` ChildHook on Windows.


(This comment also applies to the following review: 
https://reviews.apache.org/r/65469/ )

We still want to minimize the time each FD spends in an inheritable state, in 
order to minimize leaks to other forks/processes in other threads.  Ideally, 
any calls to this method should be made right before calls to `subprocess`.  
The Linux code does this implicitly, by __not__ cloexec-ing certain FDs in some 
methods.

Correct me if I'm wrong, but FDs do not need to be inheritable in order for 
`CreateProcessW` to use them as stdout/err FDs.


- Joseph


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


On Feb. 2, 2018, 12:13 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65467/
> -----------------------------------------------------------
> 
> (Updated Feb. 2, 2018, 12:13 p.m.)
> 
> 
> Review request for mesos, Akash Gupta, Jie Yu, and Joseph Wu.
> 
> 
> Bugs: MESOS-8512
>     https://issues.apache.org/jira/browse/MESOS-8512
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This function is used on Windows to explicitly enable inheritance on a
> handle.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/internal/windows/inherit.hpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/65467/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>

Reply via email to