----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56364/#review164619 -----------------------------------------------------------
I need to check how this is used in the rest of the review chain, but... Giving the ownership of the HANDLE to the caller may require much larger changes in the codebase. You may notice that we simply leak some pid's in some parts of the codebase. So we have to make sure we aren't leaking these shared objects. 3rdparty/stout/include/stout/windows/os.hpp (lines 710 - 713) <https://reviews.apache.org/r/56364/#comment236387> This is a good default. But we need a way to toggle this behavior, such that the agent's death does not kill child jobs. i.e. A Windows version of ChildHook::SETSID 3rdparty/stout/include/stout/windows/os.hpp (line 721) <https://reviews.apache.org/r/56364/#comment236388> I believe using `BOOL` as a boolean results in a warning. We often just compare it to `FALSE`. 3rdparty/stout/include/stout/windows/os.hpp (lines 730 - 734) <https://reviews.apache.org/r/56364/#comment236389> There's no `name` argument in this function... - Joseph Wu On Feb. 6, 2017, 6:31 p.m., Andrew Schwartzmeyer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/56364/ > ----------------------------------------------------------- > > (Updated Feb. 6, 2017, 6:31 p.m.) > > > Review request for mesos, Alex Clemmer and Joseph Wu. > > > Bugs: MESOS-6892 > https://issues.apache.org/jira/browse/MESOS-6892 > > > Repository: mesos > > > Description > ------- > > `os::create_job` now returns a `Try<SharedHandle>` instead of a raw > `HANDLE`, forcing ownership of the job object handle onto the caller > of the function. `create_job` requires a `std::string name` for the > job object, which is mapped from a PID using `os::name_job`. > > The assignment of a process to the job object is now done via > `Try<Nothing> os::assign_job(SharedHandle, pid_t)`. > > The equivalent of killing a process tree with job object semantics > is simply to terminate the job object. This is done via > `os::kill_job(SharedHandle)`. > > > Diffs > ----- > > 3rdparty/stout/include/stout/windows/os.hpp > b5172fca96c4151f4b1ebb6d343022558f45fc34 > > Diff: https://reviews.apache.org/r/56364/diff/ > > > Testing > ------- > > > Thanks, > > Andrew Schwartzmeyer > >
