MCPcopy Create free account
hub / github.com/chenshuo/muduo / readProcFile

Method readProcFile

examples/procmon/procmon.cc:351–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349 }
350
351 string readProcFile(const char* basename)
352 {
353 char filename[256];
354 snprintf(filename, sizeof filename, "/proc/%d/%s", pid_, basename);
355 string content;
356 FileUtil::readFile(filename, 1024*1024, &content);
357 return content;
358 }
359
360 string readLink(const char* basename)
361 {

Callers

nothing calls this directly

Calls 1

readFileFunction · 0.50

Tested by

no test coverage detected