13 #ifndef __STOUT_OS_WINDOWS_KILLTREE_HPP__ 14 #define __STOUT_OS_WINDOWS_KILLTREE_HPP__ 33 bool sessions =
false)
37 return Error(
"Failed to determine job object name: " + name.
error());
42 if (handle.isError()) {
43 return Error(
"Failed to open job object: " + handle.error());
47 if (killJobResult.isError()) {
48 return Error(
"Failed to delete job object: " + killJobResult.error());
53 std::list<ProcessTree> process_tree_list;
54 return process_tree_list;
59 #endif // __STOUT_OS_WINDOWS_KILLTREE_HPP__ Definition: errorbase.hpp:36
T & get()&
Definition: try.hpp:80
Definition: posix_signalhandler.hpp:23
Try< std::wstring > name_job(pid_t pid)
Definition: jobobject.hpp:39
Try< SharedHandle > open_job(const DWORD desired_access, const BOOL inherit_handles, const std::wstring &name)
Definition: jobobject.hpp:54
DWORD pid_t
Definition: windows.hpp:181
Try< std::list< ProcessTree > > killtree(pid_t pid, int signal, bool groups=false, bool sessions=false)
Definition: killtree.hpp:58
Try< Nothing > kill_job(SharedHandle job_handle)
Definition: jobobject.hpp:381
static Try error(const E &e)
Definition: try.hpp:43
bool isError() const
Definition: try.hpp:78
constexpr const char * name
Definition: shell.hpp:41