The finite child normally exits immediately. On a RED path, cancel and drain * before destroying; never pass a live handle to destroy. */
| 1927 | /* The finite child normally exits immediately. On a RED path, cancel and drain |
| 1928 | * before destroying; never pass a live handle to destroy. */ |
| 1929 | static bool sp_stdout_reap(cbm_subprocess_t *process, cbm_proc_result_t *result) { |
| 1930 | bool terminal = sp_stdout_poll_terminal(process, result, cbm_now_ms() + 10000U); |
| 1931 | bool cleaned = terminal; |
| 1932 | if (!cleaned) { |
| 1933 | (void)cbm_subprocess_request_cancel(process); |
| 1934 | cleaned = sp_stdout_poll_terminal(process, result, cbm_now_ms() + 4000U); |
| 1935 | } |
| 1936 | if (cleaned) |
| 1937 | cbm_subprocess_destroy(process); |
| 1938 | return terminal; |
| 1939 | } |
| 1940 | |
| 1941 | TEST(subprocess_stdout_null_preserves_merged_log) { |
| 1942 | sp_stdout_fixture_t fx; |
no test coverage detected