MCPcopy Create free account
hub / github.com/chen3feng/toft / BinaryPath

Method BinaryPath

system/process/this_process.cpp:66–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66std::string ThisProcess::BinaryPath()
67{
68 char path[PATH_MAX] = {0};
69 ssize_t length = readlink("/proc/self/exe", path, sizeof(path));
70 if (length > 0)
71 return std::string(path, length);
72 return std::string();
73}
74
75std::string ThisProcess::BinaryName()
76{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected