31 #ifndef LIBHOMEGEAR_BASE_PROCESSMANAGER_H 32 #define LIBHOMEGEAR_BASE_PROCESSMANAGER_H 34 #include "../Exception.h" 67 static void startSignalHandler();
74 static void stopSignalHandler();
77 static int32_t registerCallbackHandler(std::function<
void(pid_t pid,
int exitCode,
int signal,
bool coreDumped)> callbackHandler);
78 static void unregisterCallbackHandler(int32_t
id);
80 static std::vector<std::string> splitArguments(
const std::string& arguments);
82 static std::string findProgramInPath(
const std::string& relativePath);
93 static pid_t system(
const std::string& path,
const std::vector<std::string>& arguments,
int maxFd);
106 static pid_t systemp(
const std::string& path,
const std::vector<std::string>& arguments,
int maxFd,
int& stdIn,
int& stdOut,
int& stdErr);
116 static int32_t exec(
const std::string& command,
int maxFd, std::string&
output);
125 static bool exec(
const std::string& command,
int maxFd);
135 static FILE* popen2(
const std::string& command,
const std::string& type,
int maxFd, pid_t& pid);
142 #endif //LIBHOMEGEAR_BASE_PROCESSMANAGER_H Definition: ThreadManager.h:44
Exception class for Process.
Definition: ProcessManager.h:52
Definition: BaseLib.cpp:34
ProcessException(const std::string &message)
Definition: ProcessManager.h:55
Definition: ProcessManager.h:58
Base class for all exceptions defined in Homegear.
Definition: Exception.h:41
Definition: ProcessManager.cpp:55