| 316 | } subprocess_log_capture_t; |
| 317 | |
| 318 | static void ordered_log_callback(const char *line, void *opaque) { |
| 319 | subprocess_log_capture_t *capture = opaque; |
| 320 | int index = -1; |
| 321 | char trailing = '\0'; |
| 322 | bool parsed = sscanf(line, "line-%d%c", &index, &trailing) == 1; |
| 323 | capture->ordered = capture->ordered && parsed && index == capture->count; |
| 324 | capture->count++; |
| 325 | if (index == 399) { |
| 326 | capture->late_cancel_attempted = true; |
| 327 | capture->late_cancel_accepted = cbm_subprocess_request_cancel(capture->process); |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | static bool wait_for_log_marker(const char *path, const char *marker, uint64_t deadline_ms) { |
| 332 | char contents[8192]; |
nothing calls this directly
no test coverage detected