MCPcopy Create free account
hub / github.com/ceph/ceph / exec

Method exec

src/common/SubProcess.cc:240–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240void SubProcess::exec() {
241 ceph_assert(is_child());
242
243 std::vector<const char *> args;
244 args.push_back(cmd.c_str());
245 for (std::vector<std::string>::iterator i = cmd_args.begin();
246 i != cmd_args.end();
247 i++) {
248 args.push_back(i->c_str());
249 }
250 args.push_back(NULL);
251
252 int ret = execvp(cmd.c_str(), (char * const *)&args[0]);
253 ceph_assert(ret == -1);
254
255 std::cerr << cmd << ": exec failed: " << cpp_strerror(errno) << "\n";
256 _exit(EXIT_FAILURE);
257}
258
259int SubProcess::join() {
260 ceph_assert(is_spawned());

Callers 15

cls_2pc_queue_initFunction · 0.45
cls_2pc_queue_reserveFunction · 0.45
cls_2pc_queue_commitFunction · 0.45
cls_2pc_queue_abortFunction · 0.45
cls_refcount_getFunction · 0.45
cls_refcount_putFunction · 0.45

Calls 7

cpp_strerrorFunction · 0.85
killFunction · 0.85
execFunction · 0.50
push_backMethod · 0.45
c_strMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected