17 #ifndef __SYSTEMD_HPP__
18 #define __SYSTEMD_HPP__
41 static const char MESOS_EXECUTORS_SLICE[] =
"mesos_executors.slice";
151 #endif // __SYSTEMD_HPP__
bool enabled()
Check if systemd exists, and whether we have initialized it.
Try< Nothing > extendLifetime(pid_t child)
A hook that is executed in the parent process.
Try< Nothing > create(const Path &path, const std::string &data)
Creates a slice configuration with the provided contents at the given path.
std::string runtime_directory
Definition: systemd.hpp:65
Try< Nothing > start(const std::string &name)
Starts the slice with the given name (via 'systemctl start <name>').
Path runtimeDirectory()
Returns the path to the runtime directory for systemd units.
DWORD pid_t
Definition: windows.hpp:187
bool enabled
Definition: systemd.hpp:64
Try< Nothing > initialize(const Flags &flags)
Initialized state for support of systemd functions in this file.
Represents a POSIX or Windows file system path and offers common path manipulations.
Definition: path.hpp:145
Try< Nothing > daemonReload()
Runs systemctl daemon-reload.
std::string cgroups_hierarchy
Definition: systemd.hpp:66
Path hierarchy()
Return the path to the systemd hierarchy.
Flags to initialize systemd state.
Definition: systemd.hpp:59
bool exists()
Check if we are on a systemd environment by: (1) Testing whether /sbin/init links to systemd...
constexpr const char * name
Definition: shell.hpp:41
bool exists(const Path &path)
Returns whether a systemd slice configuration file exists at the given path.