> On March 6, 2014, 7:35 p.m., Ben Mahler wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/os/killtree.hpp, line 51 > > <https://reviews.apache.org/r/18595/diff/1/?file=506546#file506546line51> > > > > This seems a little strange, because we'll be trying to signal multiple > > times: > > > > root <- signaled 1 time > > child <- signaled 2 times > > grandchild <- signaled 3 times > > ... > > Nth level pid <- signaled N times > > > > Also, how will this be used? Let's say you use this for a 5 minute > > signal escalation on the tree originally returned by killtree(pid_t, int, > > bool, bool). 5 minutes later, how do you know the pids are still valid and > > you don't accidentally kill unrelated processes? > > Ben Mahler wrote: > Actually it's probably more productive to review r/18597 first. :)
This RR was mostly to address killing orphan processes or in other words, have a way to kill the processes that belong to a process tree root which might shutdown before its children. With the current killtree implementation, it seems to me that this would fail (the pid can't be resolved to a process and returns). Till mentioned that we might end up killing new processes same pids, which is a problem. I am not sure how we can address both; I'll take a second stab at it tomorrow :) - Niklas ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/18595/#review36486 ----------------------------------------------------------- On Feb. 27, 2014, 4:54 p.m., Niklas Nielsen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/18595/ > ----------------------------------------------------------- > > (Updated Feb. 27, 2014, 4:54 p.m.) > > > Review request for mesos and Ben Mahler. > > > Repository: mesos-git > > > Description > ------- > > New killtree(ProcessTree tree, int signal) traverse process tree and sends a > signal to all pids. This is done regardless of presence and state of process. > Patch is used by up coming signal escalation. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/os/killtree.hpp 1f45897 > > Diff: https://reviews.apache.org/r/18595/diff/ > > > Testing > ------- > > Functional testing with signal escalation code and make check. > > > Thanks, > > Niklas Nielsen > >
