You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Alex Clemmer <cl...@gmail.com> on 2016/04/18 20:52:25 UTC

Review Request 46341: Stout:[2/2] Transitioned reap.cpp to `os::waitpid`.

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

Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.


Bugs: MESOS-4466
    https://issues.apache.org/jira/browse/MESOS-4466


Repository: mesos


Description
-------

Stout:[2/2] Transitioned reap.cpp to `os::waitpid`.


Diffs
-----

  3rdparty/libprocess/src/reap.cpp 110386842d5eeccfbc4e48bfca88d79a9d087fb0 

Diff: https://reviews.apache.org/r/46341/diff/


Testing
-------


Thanks,

Alex Clemmer


Re: Review Request 46341: Stout:[2/2] Transitioned reap.cpp to `os::waitpid`.

Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46341/#review130183
-----------------------------------------------------------


Ship it!




Ship It!

- Joris Van Remoortere


On April 20, 2016, 4:37 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46341/
> -----------------------------------------------------------
> 
> (Updated April 20, 2016, 4:37 p.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Bugs: MESOS-4466
>     https://issues.apache.org/jira/browse/MESOS-4466
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout:[2/2] Transitioned reap.cpp to `os::waitpid`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/reap.cpp 110386842d5eeccfbc4e48bfca88d79a9d087fb0 
> 
> Diff: https://reviews.apache.org/r/46341/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 46341: Stout:[2/2] Transitioned reap.cpp to `os::waitpid`.

Posted by Alex Clemmer <cl...@gmail.com>.

> On April 20, 2016, 7:05 p.m., Joris Van Remoortere wrote:
> > 3rdparty/libprocess/src/reap.cpp, lines 98-106
> > <https://reviews.apache.org/r/46341/diff/2/?file=1353396#file1353396line98>
> >
> >     Does this logic still work the same way, now that we are using `Result`?
> >     Are we handling the `Error` and `None` states the same?

Unless I'm missing something completely obvious, I believe the answer is yes, and we do have tests to cover this. [1] indicates that the possible return values are `-1`, `0`, numbers `> 0`. We map `-1` to `Error`, we map `0` to `None`, and we map numbers `> 0` to `Some` of `pid_t`.

If you change `if (child_pid.isSome())`, you will see other tests fail. For example, if you change this line to `if (!child_pid.isNone())`, then `ReapTest.NonChildProcess` fails. Alternatively, on Windows, `PipeOutputToFileDescriptor` from review 46424[2] would call `notify` and emit `STILL_ACTIVE`, which in conjunction with `WIFEXITSTATUS` would emit some weirdo exit code `0xFF & STILL_ACTIVE`, even though the process was not reaped.

Does this answer your question?

[1] http://linux.die.net/man/2/waitpid
[2] https://reviews.apache.org/r/46424/


- Alex


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


On April 20, 2016, 4:37 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46341/
> -----------------------------------------------------------
> 
> (Updated April 20, 2016, 4:37 p.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Bugs: MESOS-4466
>     https://issues.apache.org/jira/browse/MESOS-4466
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout:[2/2] Transitioned reap.cpp to `os::waitpid`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/reap.cpp 110386842d5eeccfbc4e48bfca88d79a9d087fb0 
> 
> Diff: https://reviews.apache.org/r/46341/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 46341: Stout:[2/2] Transitioned reap.cpp to `os::waitpid`.

Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46341/#review129780
-----------------------------------------------------------




3rdparty/libprocess/src/reap.cpp (lines 98 - 106)
<https://reviews.apache.org/r/46341/#comment193337>

    Does this logic still work the same way, now that we are using `Result`?
    Are we handling the `Error` and `None` states the same?


- Joris Van Remoortere


On April 20, 2016, 4:37 p.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46341/
> -----------------------------------------------------------
> 
> (Updated April 20, 2016, 4:37 p.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Bugs: MESOS-4466
>     https://issues.apache.org/jira/browse/MESOS-4466
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout:[2/2] Transitioned reap.cpp to `os::waitpid`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/reap.cpp 110386842d5eeccfbc4e48bfca88d79a9d087fb0 
> 
> Diff: https://reviews.apache.org/r/46341/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 46341: Stout:[2/2] Transitioned reap.cpp to `os::waitpid`.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46341/
-----------------------------------------------------------

(Updated April 20, 2016, 4:37 p.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.


Bugs: MESOS-4466
    https://issues.apache.org/jira/browse/MESOS-4466


Repository: mesos


Description
-------

Stout:[2/2] Transitioned reap.cpp to `os::waitpid`.


Diffs (updated)
-----

  3rdparty/libprocess/src/reap.cpp 110386842d5eeccfbc4e48bfca88d79a9d087fb0 

Diff: https://reviews.apache.org/r/46341/diff/


Testing
-------


Thanks,

Alex Clemmer