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

Function start_child

tests/test_coverage_children.c:253–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253static bool start_child(Child *child, const char *root) {
254 if (child->operation >= EXEC_VE && child->operation <= FAILED_EXEC &&
255 !prepare_receiver(child, root))
256 return false;
257 if (pipe(child->ack) != 0 || pipe(child->gate) != 0 || fflush(NULL) != 0)
258 return false;
259 child->pid = fork();
260 if (child->pid == 0)
261 child_body(child);
262 return child->pid > 0 && close_fd(&child->ack[1]) && close_fd(&child->gate[0]);
263}
264
265static bool ready_child(Child *child, const char *root, const char *stem) {
266 if (!profile_paths(child, root, stem) || !expect_byte(child->ack[0], 'R'))

Callers 1

run_childFunction · 0.85

Calls 3

prepare_receiverFunction · 0.85
child_bodyFunction · 0.85
close_fdFunction · 0.70

Tested by

no test coverage detected