| 3919 | } replace_during_poll_ctx_t; |
| 3920 | |
| 3921 | static int replace_during_poll_callback(const char *name, const char *path, void *ud) { |
| 3922 | (void)path; |
| 3923 | replace_during_poll_ctx_t *ctx = ud; |
| 3924 | ctx->calls++; |
| 3925 | /* Re-registering can happen when a second daemon session initializes while |
| 3926 | * this project's watcher snapshot is being polled. The old state must stay |
| 3927 | * alive until the snapshot finishes using it. */ |
| 3928 | cbm_watcher_watch(ctx->watcher, name, ctx->replacement_root); |
| 3929 | return 0; |
| 3930 | } |
| 3931 | |
| 3932 | TEST(watcher_replace_during_poll_defers_old_state_free) { |
| 3933 | char original[256]; |
nothing calls this directly
no test coverage detected