> On April 14, 2016, 9:10 p.m., Michael Park wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, lines 173-183
> > <https://reviews.apache.org/r/46013/diff/6/?file=1344018#file1344018line173>
> >
> >     (1) It seems like this should live in `posix/os.hpp`.
> >     (2) The declaration of this function in `windows/os.hpp` is:
> >     ```
> >     inline Result<Process> process(pid_t pid);
> >     ```
> >     It seems like the windows version needs all 3 states whereas the POSIX 
> > version only needs 2?
> >     If that is the case, I think it makes sense to consolidate to using 
> > `Result` in both cases and
> >     leave a comment on the POSIX version that we have the 3 states because 
> > of Windows.

I think I must be missing something. There is a version of `process` that 
returns a `Result` in `linux.hpp`, `osx.hpp`, and so on -- the version whose 
prototype you mention here is just the Windows implementation of this.

For the function you are highlighting here in your comment, which returns 
`Option`, this is separate -- it is meant to be shared among all platforms. 
There is no need for it to return `Result` because it is just finding a process 
with a certain `pid` in a list of processes.

So, my recommendation is to keep it the way it is.

Thoughts?


- Alex


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


On April 15, 2016, 7:50 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46013/
> -----------------------------------------------------------
> 
> (Updated April 15, 2016, 7:50 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, 
> Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Bugs: MESOS-4471
>     https://issues.apache.org/jira/browse/MESOS-4471
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout: Implemented `os::processes` on Windows.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 
> 79e30ca04c6d23f92e3a2f80fbe38ae63fde3520 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 
> edaa76a5322d0bf60b7172405aa754b5aca95458 
>   3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp 
> c48106e5905e3be0faeba7177ef534766089faff 
> 
> Diff: https://reviews.apache.org/r/46013/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>

Reply via email to