26 int path_size = readlink(
"/proc/self/exe", buffer,
sizeof(buffer));
29 "readlink(\"/proc/self/exe\", ...) failed");
32 buffer[path_size] =
'\0';
33 return std::string(buffer);
48 int path_size = proc_pidpath(pid, buffer,
sizeof(buffer));
51 "readlink(\"/proc/self/exe\", ...) failed");
53 return std::string(buffer);
64 return bin_path.remove_filename().string();
69 return bin_path.filename().string();