| 1912 | } |
| 1913 | |
| 1914 | static 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. */ |
no test coverage detected