#include "ProcessUtil.h"
#include <algorithm>
#include <cctype>
#include <filesystem>
#include <fstream>
#include <optional>
#include <string>
#include <system_error>
#include <thread>
Go to the source code of this file.
|
| std::optional< std::string > | FindIceConfigArgument (const std::vector< std::string > &arguments) |
| |
| std::vector< std::string > | GetProcessArguments (int pid) |
| | Reads the full argument vector of pid from /proc/<pid>/cmdline.
|
| |
| std::string | GetProcessName (int pid) |
| | Reads the name of the executable behind pid (the basename of argv[0]).
|
| |
| Identity | IdentifyProcess (int pid, const std::string &executableName, const std::string &configPath) |
| | Checks whether the process with the given pid is still the application it is supposed to be.
|
| |
| bool | IsAlive (int pid) |
| |
| bool | IsZombie (int pid) |
| |
| std::vector< ProcessInfo > | ScanProcesses () |
| | Walks /proc and returns every process whose argument vector could be read.
|
| |
| bool | WaitForExit (int pid, std::chrono::milliseconds timeout, std::chrono::milliseconds pollInterval=std::chrono::milliseconds(20)) |
| | Blocks until the process with the given pid has disappeared, at most for timeout.
|
| |