Resolve a per-supervisor-run temp path /logs/.supervisor- * (falls back to the CWD if the cache dir is unresolvable). Used for the crash- * attribution marker and the quarantine list during the recovery re-run. */
| 7430 | * (falls back to the CWD if the cache dir is unresolvable). Used for the crash- |
| 7431 | * attribution marker and the quarantine list during the recovery re-run. */ |
| 7432 | static void supervisor_tmp_path(char *out, size_t out_sz, const char *suffix) { |
| 7433 | const char *cdir = cbm_resolve_cache_dir(); |
| 7434 | if (cdir && cdir[0]) { |
| 7435 | char logdir[CBM_SZ_1K]; |
| 7436 | snprintf(logdir, sizeof(logdir), "%s/logs", cdir); |
| 7437 | cbm_mkdir_p(logdir, 0755); |
| 7438 | snprintf(out, out_sz, "%s/.supervisor-%d%s", logdir, (int)getpid(), suffix); |
| 7439 | } else { |
| 7440 | snprintf(out, out_sz, ".supervisor-%d%s", (int)getpid(), suffix); |
| 7441 | } |
| 7442 | } |
| 7443 | |
| 7444 | /* Parse the worker's marker JOURNAL ("S <rel>" / "D <rel>" lines, one event |
| 7445 | * per line — see cbm_index_mark_start/done) into the crash/hang SUSPECT set: |
no test coverage detected