MCPcopy Create free account
hub / github.com/MemNixFS/MemNixFS / format_pslist_csv

Function format_pslist_csv

src/os/linux/csv_export.cpp:74–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72} // anonymous
73
74ByteBuf format_pslist_csv(const Engine& eng) {
75 std::string out;
76 out.reserve(64 * 1024);
77 out += "pid,ppid,tgid,uid,comm,cmdline\r\n";
78 for (const auto& p : eng.processes()) {
79 out += fmt::format("{},{},{},{},{},{}\r\n",
80 p.pid, p.ppid, p.tgid, p.uid,
81 csv_quote(p.comm),
82 csv_quote(read_cmdline_oneline(eng, p)));
83 }
84 return ByteBuf(out.begin(), out.end());
85}
86
87namespace {
88

Callers 1

build_sys_treeFunction · 0.85

Calls 2

csv_quoteFunction · 0.85
read_cmdline_onelineFunction · 0.70

Tested by

no test coverage detected