You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrew Schwartzmeyer <an...@schwartzmeyer.com> on 2018/03/01 00:32:06 UTC

Re: Review Request 65841: Changed `os::system` to return `Option` instead of `int`.

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



Before I review this, it needs to be split for stout and mesos changes.

- Andrew Schwartzmeyer


On Feb. 28, 2018, 10:12 a.m., Akash Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65841/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2018, 10:12 a.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-4549
>     https://issues.apache.org/jira/browse/MESOS-4549
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `os::system` returned -1 on error, which is a valid error code on
> Windows, e.g., `os::system("exit -1")`, so it was impossible to
> distinguish a failure from a process returning -1. With `Option<int>`,
> failures will return as `None`..
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/os/posix/shell.hpp b878718e137e4c8b599e0f4dac67672d8df27f7d 
>   3rdparty/stout/include/stout/os/windows/shell.hpp 1696d084c8453fa0eb9ef41e0a4128e547f7f53c 
>   3rdparty/stout/tests/os/rmdir_tests.cpp 2fd24a825068019423674f74fb71cc61d3c504b5 
>   3rdparty/stout/tests/os_tests.cpp d04c3b95b24a519eb21ff07fa51da7c2cefe2b61 
>   src/slave/containerizer/mesos/launch.cpp 75b7eaf9cd62d6b5f02896175168b651f4517e12 
>   src/tests/containerizer/cgroups_isolator_tests.cpp 59b23be78efb4025bfef53a19ab97d9873ab8dc9 
>   src/tests/containerizer/memory_pressure_tests.cpp 0c3e738ce05553a2ee5c38c6748d6d28a1eb93d3 
>   src/tests/environment.cpp 1cba274e0e684b123ce1e4d9cd296f428022fcdc 
> 
> 
> Diff: https://reviews.apache.org/r/65841/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Akash Gupta
> 
>


Re: Review Request 65841: Changed `os::system` to return `Option` instead of `int`.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.

> On Feb. 28, 2018, 4:32 p.m., Andrew Schwartzmeyer wrote:
> > Before I review this, it needs to be split for stout and mesos changes.

(Otherwise I'll leave a bunch of comments on code that'll get deleted from this review ;)


- Andrew


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


On Feb. 28, 2018, 10:12 a.m., Akash Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65841/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2018, 10:12 a.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-4549
>     https://issues.apache.org/jira/browse/MESOS-4549
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `os::system` returned -1 on error, which is a valid error code on
> Windows, e.g., `os::system("exit -1")`, so it was impossible to
> distinguish a failure from a process returning -1. With `Option<int>`,
> failures will return as `None`..
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/os/posix/shell.hpp b878718e137e4c8b599e0f4dac67672d8df27f7d 
>   3rdparty/stout/include/stout/os/windows/shell.hpp 1696d084c8453fa0eb9ef41e0a4128e547f7f53c 
>   3rdparty/stout/tests/os/rmdir_tests.cpp 2fd24a825068019423674f74fb71cc61d3c504b5 
>   3rdparty/stout/tests/os_tests.cpp d04c3b95b24a519eb21ff07fa51da7c2cefe2b61 
>   src/slave/containerizer/mesos/launch.cpp 75b7eaf9cd62d6b5f02896175168b651f4517e12 
>   src/tests/containerizer/cgroups_isolator_tests.cpp 59b23be78efb4025bfef53a19ab97d9873ab8dc9 
>   src/tests/containerizer/memory_pressure_tests.cpp 0c3e738ce05553a2ee5c38c6748d6d28a1eb93d3 
>   src/tests/environment.cpp 1cba274e0e684b123ce1e4d9cd296f428022fcdc 
> 
> 
> Diff: https://reviews.apache.org/r/65841/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Akash Gupta
> 
>