24#ifndef MEMORYACCESSOR_SRC_TOOLS_H_
25#define MEMORYACCESSOR_SRC_TOOLS_H_
33#include <unordered_set>
53 void SetBufferSize(
const size_t &buffer_size) { buffer_size_ = buffer_size; }
55 int SetSigint(
void (*handler)(
int))
const noexcept;
57 std::FILE *
ShellCommand(
const std::string &command)
const noexcept;
58 std::unordered_set<pid_t>
GetAllPids() const noexcept;
60 std::unordered_set<pid_t>
62 uint8_t
PidExists(const pid_t &pid) const noexcept;
63 uint8_t
ProcessExists(const std::
string &pname) const noexcept;
68 std::array<std::unique_ptr<
char[]>, 2>
70 size_t &done, const
size_t &len) const noexcept;
73 const std::
string kModes{
"rwxs"};
75 const uint8_t kModesLength{
static_cast<uint8_t
>(