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

Function cli_scope_reap_host

tests/test_cli.c:1763–1774  ·  view source on GitHub ↗

Reap the host child, with no deadline: the release signal makes a healthy * child exit within seconds, and a wedged one is left to the harness's * per-suite ceiling (see CLI_SCOPE_TIMEOUT_MS). Returns the child's exit code, * or -1 when it did not exit normally. */

Source from the content-addressed store, hash-verified

1761 * per-suite ceiling (see CLI_SCOPE_TIMEOUT_MS). Returns the child's exit code,
1762 * or -1 when it did not exit normally. */
1763static int cli_scope_reap_host(pid_t host) {
1764 int status = 0;
1765 for (;;) {
1766 pid_t reaped = waitpid(host, &status, 0);
1767 if (reaped == host) {
1768 return WIFEXITED(status) ? WEXITSTATUS(status) : -1;
1769 }
1770 if (reaped < 0 && errno != EINTR) {
1771 return -1;
1772 }
1773 }
1774}
1775
1776/* One IPC attempt's outcome for cli_scope_until_answered. */
1777typedef enum {

Callers 1

cli_scope_fixture_finishFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected