> On Oct. 28, 2014, 5:40 p.m., Vinod Kone wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/killtree.hpp, line 161
> > <https://reviews.apache.org/r/27295/diff/1/?file=735584#file735584line161>
> >
> >     Don't you have to check that child is not already in queue because it 
> > might be added in #80 or #84?

No, we mark visited pids on #145 so on #127 we'll just continue if the pid has 
already been visited, i.e., it's okay to add a pid we've already seen or is 
already in the queue.


> On Oct. 28, 2014, 5:40 p.m., Vinod Kone wrote:
> > 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp, line 682
> > <https://reviews.apache.org/r/27295/diff/1/?file=735585#file735585line682>
> >
> >     #669 seems to indicate that process could be none when we are here? why 
> > not have ASSERT_SOME(process) up there instead?

Good catch but it's the isNone() that is erroneous. We wait for it to exit and 
become zombied so that we can then reap it.


- Ian


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


On Oct. 28, 2014, 11:28 a.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27295/
> -----------------------------------------------------------
> 
> (Updated Oct. 28, 2014, 11:28 a.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Bugs: MESOS-1875
>     https://issues.apache.org/jira/browse/MESOS-1875
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Improve os::killtree() for the case when the root pid has exited and
> it has been instructed to either follow process groups or sessions. It
> will now kill all processes (and their trees) with pgid or session
> matching the root pid.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/killtree.hpp 
> fa1950cc8849fcd81d425c651848e05661111078 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp 
> e9f37dfd3cf54c3ca85d74716b3ee4262b065fad 
> 
> Diff: https://reviews.apache.org/r/27295/diff/
> 
> 
> Testing
> -------
> 
> Added a test where the root pid exits (and is reaped), leaving behind a 
> reparented subtree. This test initially fails.
> 
> +  // -+- child exit 0             [new session and process group leader]
> +  //  -+- grandchild sleep 100
> +  //   -+- great grandchild sleep 100
> 
> 
> Thanks,
> 
> Ian Downes
> 
>

Reply via email to