Re: Review Request 44123: Stout: [1/2] Implemented assorted `os::` functions on Windows.

2016-04-18 Thread Daniel Pravat

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

(Updated April 19, 2016, 12:09 a.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Alex 
Clemmer, Joris Van Remoortere, and Michael Park.


Repository: mesos


Description
---

Stout: [1/2] Implemented assorted `os::` functions on Windows.


Diffs (updated)
-

  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/44123/diff/


Testing
---

OSX: make check


Thanks,

Daniel Pravat



Re: Review Request 44123: Stout: [1/2] Implemented assorted `os::` functions on Windows.

2016-04-18 Thread Joris Van Remoortere

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




3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 


I think this breaks the linux build?


- Joris Van Remoortere


On April 15, 2016, 7:10 a.m., Daniel Pravat wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44123/
> ---
> 
> (Updated April 15, 2016, 7:10 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Alex 
> Clemmer, Joris Van Remoortere, and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Stout: [1/2] Implemented assorted `os::` functions on Windows.
> 
> 
> Diffs
> -
> 
>   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/44123/diff/
> 
> 
> Testing
> ---
> 
> OSX: make check
> 
> 
> Thanks,
> 
> Daniel Pravat
> 
>



Re: Review Request 44123: Stout: [1/2] Implemented assorted `os::` functions on Windows.

2016-04-15 Thread Daniel Pravat

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

(Updated April 15, 2016, 7:10 a.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Alex 
Clemmer, Joris Van Remoortere, and Michael Park.


Repository: mesos


Description
---

Stout: [1/2] Implemented assorted `os::` functions on Windows.


Diffs (updated)
-

  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/44123/diff/


Testing
---

OSX: make check


Thanks,

Daniel Pravat



Re: Review Request 44123: Stout: [1/2] Implemented assorted `os::` functions on Windows.

2016-04-14 Thread Daniel Pravat

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

(Updated April 15, 2016, 12:23 a.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Alex 
Clemmer, Joris Van Remoortere, and Michael Park.


Repository: mesos


Description
---

Stout: [1/2] Implemented assorted `os::` functions on Windows.


Diffs (updated)
-

  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/44123/diff/


Testing
---

OSX: make check


Thanks,

Daniel Pravat



Re: Review Request 44123: Stout: [1/2] Implemented assorted `os::` functions on Windows.

2016-04-14 Thread Alex Clemmer


> On April 12, 2016, 2:57 p.m., Joris Van Remoortere wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp, lines 
> > 188-189
> > 
> >
> > Where did `processes()` go?

It goes into a later review. We can add back the `= delete` until then.


- Alex


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


On April 11, 2016, 4:20 a.m., Daniel Pravat wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44123/
> ---
> 
> (Updated April 11, 2016, 4:20 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Alex 
> Clemmer, Joris Van Remoortere, and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Stout: [1/2] Implemented assorted `os::` functions on Windows.
> 
> 
> Diffs
> -
> 
>   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/44123/diff/
> 
> 
> Testing
> ---
> 
> OSX: make check
> 
> 
> Thanks,
> 
> Daniel Pravat
> 
>



Re: Review Request 44123: Stout: [1/2] Implemented assorted `os::` functions on Windows.

2016-04-14 Thread Alex Clemmer


> On April 13, 2016, 2:38 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp, line 168
> > 
> >
> > Do we no longer have a "not implemented" error?

Per our conversation on Slack, we have decided that we never did.


> On April 13, 2016, 2:38 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp, line 86
> > 
> >
> > Is it worth handling the error case here?

Ok, let's do it. In the case that the `FormatMessage` call failed, I choose to 
just output the error code instead of calling `FormatMessage` again, though. It 
can't be turtles _all_ the way down!


> On April 13, 2016, 2:38 a.m., Alex Naparu wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp, line 232
> > 
> >
> > We don't have a X_OK flag in Windows, so we might want to mask that out 
> > before calling `::access`.

Here's my perpective. If we try to call this with `X_OK` we will get a symbol 
undefined error. Also, if someone `#define`s it themselves, masking won't help. 
Also, we have a pattern for dealing with `#define`s, which is usually to 
explicitly not mask out flags that we don't `#define`.

Thoughts?


- Alex


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


On April 11, 2016, 4:20 a.m., Daniel Pravat wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44123/
> ---
> 
> (Updated April 11, 2016, 4:20 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Alex 
> Clemmer, Joris Van Remoortere, and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Stout: [1/2] Implemented assorted `os::` functions on Windows.
> 
> 
> Diffs
> -
> 
>   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/44123/diff/
> 
> 
> Testing
> ---
> 
> OSX: make check
> 
> 
> Thanks,
> 
> Daniel Pravat
> 
>



Re: Review Request 44123: Stout: [1/2] Implemented assorted `os::` functions on Windows.

2016-04-12 Thread Alex Naparu

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




3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (line 86)


Is it worth handling the error case here?



3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (line 164)


Do we no longer have a "not implemented" error?



3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (line 228)


We don't have a X_OK flag in Windows, so we might want to mask that out 
before calling `::access`.


- Alex Naparu


On April 11, 2016, 4:20 a.m., Daniel Pravat wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44123/
> ---
> 
> (Updated April 11, 2016, 4:20 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Alex 
> Clemmer, Joris Van Remoortere, and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Stout: [1/2] Implemented assorted `os::` functions on Windows.
> 
> 
> Diffs
> -
> 
>   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/44123/diff/
> 
> 
> Testing
> ---
> 
> OSX: make check
> 
> 
> Thanks,
> 
> Daniel Pravat
> 
>



Re: Review Request 44123: Stout: [1/2] Implemented assorted `os::` functions on Windows.

2016-04-12 Thread Alex Naparu

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




3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (line 134)


You can probably inline this.



3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (line 212)


This would probably fit on one line if you wrote it as "if 
(!::GetEnvironmentVariable..."


- Alex Naparu


On April 11, 2016, 4:20 a.m., Daniel Pravat wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44123/
> ---
> 
> (Updated April 11, 2016, 4:20 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Alex 
> Clemmer, Joris Van Remoortere, and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Stout: [1/2] Implemented assorted `os::` functions on Windows.
> 
> 
> Diffs
> -
> 
>   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/44123/diff/
> 
> 
> Testing
> ---
> 
> OSX: make check
> 
> 
> Thanks,
> 
> Daniel Pravat
> 
>



Re: Review Request 44123: Stout: [1/2] Implemented assorted `os::` functions on Windows.

2016-04-12 Thread Joris Van Remoortere

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


Fix it, then Ship it!





3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp (line 464)


why does this return a `const` string by value?



3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (lines 97 - 98)


We don't need to break after return.



3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (lines 128 - 
130)


Please put the `NOTE:` on a new line.



3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (lines 184 - 
185)


Where did `processes()` go?



3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (lines 212 - 
213)


2 spaces for expression continuation.

If an expression does not fit on 1 line, please leave a blank line after it.



3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp (lines 212 - 
216)


Why does a `value_size` of 0 mean `None`?
Is it not just the empty string?
Can you add a comment here?


- Joris Van Remoortere


On April 11, 2016, 4:20 a.m., Daniel Pravat wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44123/
> ---
> 
> (Updated April 11, 2016, 4:20 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Alex 
> Clemmer, Joris Van Remoortere, and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Stout: [1/2] Implemented assorted `os::` functions on Windows.
> 
> 
> Diffs
> -
> 
>   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/44123/diff/
> 
> 
> Testing
> ---
> 
> OSX: make check
> 
> 
> Thanks,
> 
> Daniel Pravat
> 
>



Re: Review Request 44123: Stout: [1/2] Implemented assorted `os::` functions on Windows.

2016-04-10 Thread Daniel Pravat

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

(Updated April 11, 2016, 4:20 a.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Alex 
Clemmer, Joris Van Remoortere, and Michael Park.


Repository: mesos


Description
---

Stout: [1/2] Implemented assorted `os::` functions on Windows.


Diffs (updated)
-

  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/44123/diff/


Testing (updated)
---

OSX: make check


Thanks,

Daniel Pravat