| 355 | } subprocess_log_capture_t; |
| 356 | |
| 357 | static void ordered_log_callback(const char *line, void *opaque) { |
| 358 | subprocess_log_capture_t *capture = opaque; |
| 359 | int index = -1; |
| 360 | char trailing = '\0'; |
| 361 | bool parsed = sscanf(line, "line-%d%c", &index, &trailing) == 1; |
| 362 | capture->ordered = capture->ordered && parsed && index == capture->count; |
| 363 | capture->count++; |
| 364 | if (index == 399) { |
| 365 | capture->late_cancel_attempted = true; |
| 366 | capture->late_cancel_accepted = cbm_subprocess_request_cancel(capture->process); |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | static bool wait_for_log_marker(const char *path, const char *marker, uint64_t deadline_ms) { |
| 371 | char contents[8192]; |
nothing calls this directly
no test coverage detected