Project: mesos
Issue MESOS-3639: Implement stout/os/windows/killtree.hpp
killtree() is implemented using Windows Job Objects. The processes created by the executor are associated with a job object using `create_job'. killtree() is simply terminating the job object. Helper functions: `create_job` function creates a job object whose name is derived from the `pid` and associates the `pid` process with the job object. Every process started by the process which is part of the job object becomes part of the job object. The job name should match the name used in `kill_job`. The jobs should be create with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE and allow the caller to decide how to handle the returned handle. `kill_job` function assumes the process identified by `pid` is associated with a job object whose name is derive from it. Every process started by the process which is part of the job object becomes part of the job object. Destroying the task will close all such processes.
Story points: 5