MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / reap

Function reap

tests/test_coverage_children.c:186–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186static bool reap(Child *child, bool terminate, int *status, bool *reaped) {
187 if (child->pid < 0)
188 return true;
189 bool ok = true;
190 if (terminate && kill(child->pid, SIGKILL) != 0 && errno != ESRCH)
191 ok = false;
192 pid_t result;
193 do {
194 result = waitpid(child->pid, status, 0);
195 } while (result < 0 && errno == EINTR);
196 if (result == child->pid || (result < 0 && errno == ECHILD))
197 *reaped = true;
198 return result == child->pid && ok;
199}
200
201static bool profile_paths(Child *child, const char *root, const char *stem) {
202 return path_fits(snprintf(child->profile, sizeof(child->profile), "%s/%s/%s.%ld.profraw", root,

Callers 2

finish_childFunction · 0.70
run_childFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected