MCPcopy Create free account
hub / github.com/apache/brpc / ReadSelfCmdline

Method ReadSelfCmdline

src/bvar/default_variables.cpp:607–611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605struct ReadSelfCmdline {
606 std::string content;
607 ReadSelfCmdline() {
608 char buf[1024];
609 const ssize_t nr = butil::ReadCommandLine(buf, sizeof(buf), true);
610 content.append(buf, nr);
611 }
612};
613static void get_cmdline(std::ostream& os, void*) {
614 os << butil::get_leaky_singleton<ReadSelfCmdline>()->content;

Callers

nothing calls this directly

Calls 2

ReadCommandLineFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected