52 std::stringstream
ss;
ss <<
"/proc/" << process.
pid() <<
"/oom_score_adj";
53 std::ifstream
in(
ss.str());
63 throw std::logic_error(
"Value for adjusting the oom score is invalid.");
65 std::stringstream
ss;
ss <<
"/proc/" << process.
pid() <<
"/oom_score_adj";
66 std::ofstream
out(
ss.str());
The Process class models a process and possible operations on it.
virtual pid_t pid() const
Query the pid of the process.
CORE_POSIX_DLL_PUBLIC const posix::Process & operator>>(const posix::Process &process, OomAdj &adj)
Read the OomAdj value for a process instance.
CORE_POSIX_DLL_PUBLIC const posix::Process & operator<<(const posix::Process &process, const OomAdj &adj)
Write the OomAdj value for a process instance.
Signal
The Signal enum collects the most common POSIX signals.
static int min_value()
Returns the minimum valid value.
static int max_value()
Returns the maximum valid value.