22 #include "softwarecontainer-log.h" 31 typedef int32_t ContainerID;
32 typedef std::map<std::string, std::string> EnvironmentVariables;
34 static constexpr pid_t INVALID_PID = -1;
35 static constexpr
int INVALID_FD = -1;
36 static constexpr uid_t ROOT_UID = 0;
48 waitpid(pid, &status, 0);
49 return WEXITSTATUS(status);
73 bool isFile(
const std::string &path);
80 bool isPipe(
const std::string &path);
87 bool isSocket(
const std::string &path);
96 std::string parentPath(
const std::string &path);
97 std::string baseName(
const std::string &path);
99 bool touch(
const std::string &path);
100 bool writeToFile(
const std::string &path,
const std::string &content);
101 bool readFromFile(
const std::string &path, std::string &content);
102 bool parseInt(
const char *args,
int *result);
111 std::string buildPath(
const std::string &arg1,
const std::string &arg2);
112 std::string buildPath(
const std::string &arg1,
const std::string &arg2,
const std::string &arg3);
bool isDirectoryEmpty(const std::string &path)
isDirectoryEmpty Check if path is empty
bool isDirectory(const std::string &path)
isDirectory Check if path is a directory
bool isPipe(const std::string &path)
isPipe Check if path is a pipe
bool existsInFileSystem(const std::string &path)
existsInFileSystem Check if path exists
int waitForProcessTermination(pid_t pid)
waitForProcessTermination Waits for a process to terminate and then returns the status of the process...
bool isFile(const std::string &path)
isFile Check if path is a file
bool isSocket(const std::string &path)
isSocket Check if path is a socket
Developers guide to adding a config item: