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

Function sp_stdout_poll_terminal

tests/test_subprocess.c:1914–1925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1912}
1913
1914static bool sp_stdout_poll_terminal(cbm_subprocess_t *process, cbm_proc_result_t *result,
1915 uint64_t deadline) {
1916 do {
1917 cbm_proc_poll_t state = cbm_subprocess_poll(process, result);
1918 if (state == CBM_PROC_POLL_TERMINAL)
1919 return true;
1920 if (state == CBM_PROC_POLL_ERROR)
1921 return false;
1922 cbm_usleep(1000);
1923 } while (cbm_now_ms() < deadline);
1924 return false;
1925}
1926
1927/* The finite child normally exits immediately. On a RED path, cancel and drain
1928 * before destroying; never pass a live handle to destroy. */

Callers 2

sp_stdout_reapFunction · 0.85
sp_stdin_finishFunction · 0.85

Calls 2

cbm_subprocess_pollFunction · 0.85
cbm_now_msFunction · 0.85

Tested by

no test coverage detected