File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,10 +75,18 @@ static int tf_maybe_run_index_worker(int argc, char **argv) {
7575 (void )fclose (rf );
7676 }
7777 }
78- free (result );
7978 }
80- cbm_mcp_server_free (srv );
81- return 0 ;
79+ /* Faithful worker exit: mirror run_cli's supervised-worker fast path.
80+ * The worker-role pipeline deliberately skips its teardown (the OS
81+ * reclaims everything wholesale on process death), so a normal return
82+ * through main() lets LeakSanitizer run at exit, report the
83+ * intentionally-unfreed pipeline, and force exit code 1 — the
84+ * supervisor then reads a HEALTHY index as worker_failed (the
85+ * Linux-only IDX832 red: LSan is active in Linux gcc ASan builds,
86+ * absent on macOS/Windows). _Exit skips atexit/LSan by design,
87+ * exactly like the production worker in run_cli. */
88+ fflush (NULL );
89+ _Exit (result ? 0 : 1 );
8290}
8391
8492/* #798 follow-up: socket-isolation probe. The parent test
You can’t perform that action at this time.
0 commit comments