MCPcopy Create free account
hub / github.com/Alexays/Waybar / exec

Function exec

include/util/command.hpp:124–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124inline struct res exec(const std::string& cmd, const std::string& output_name) {
125 int pid;
126 auto fp = command::open(cmd, pid, output_name);
127 if (!fp) return {-1, ""};
128 auto output = command::read(fp);
129 auto stat = command::close(fp, pid);
130 return {WEXITSTATUS(stat), output};
131}
132
133inline struct res execNoRead(const std::string& cmd) {
134 int pid;

Callers 4

processEventsMethod · 0.85
updateMethod · 0.85
delayWorkerMethod · 0.85
waitingWorkerMethod · 0.85

Calls 3

openFunction · 0.85
readFunction · 0.85
closeFunction · 0.85

Tested by

no test coverage detected