#ifndef __HL_PROCESS_H #define __HL_PROCESS_H #include #include #include #include class OsProcess { public: static std::string execCommand(const std::string& cmdline); static int execSystem(const std::string& cmdline); static std::shared_ptr asyncExecCommand(const std::string& cmdline, std::function line_callback, std::function finished_callback, bool& finish_flag); #if defined(TARGET_OSX) || defined(TARGET_LINUX) static pid_t findPid(const std::string& cmdline); static void killByPid(pid_t pid); #endif }; #endif