| 726 | } subprocess_log_capture_t; |
| 727 | |
| 728 | static void ordered_log_callback(const char *line, void *opaque) { |
| 729 | subprocess_log_capture_t *capture = opaque; |
| 730 | int index = -1; |
| 731 | char trailing = '\0'; |
| 732 | bool parsed = sscanf(line, "line-%d%c", &index, &trailing) == 1; |
| 733 | capture->ordered = capture->ordered && parsed && index == capture->count; |
| 734 | capture->count++; |
| 735 | if (index == 399) { |
| 736 | capture->late_cancel_attempted = true; |
| 737 | capture->late_cancel_accepted = cbm_subprocess_request_cancel(capture->process); |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | static bool wait_for_log_marker(const char *path, const char *marker, uint64_t deadline_ms) { |
| 742 | char contents[8192]; |
nothing calls this directly
no test coverage detected