# XCE Worker Daemon (xcecd) ## Overview C daemon running on each compute node. Manages job execution, hardware monitoring, and process lifecycle on worker nodes. ## Build ```bash /xce-build worker # lib + worker daemon (see build-deployment.md) ``` ## Architecture - `src/main.c` — Main daemon entry point (`int main`); links against `xcecd_srcs` from `src/xcecd.c` and friends - `src/hardware_monitor.c` — CPU/memory resource monitoring (no GPU) - `src/process_worker_manager.c` + `src/uv_proc.c` — Job process lifecycle (fork `xcecd_worker`, spawn/exec the job command); `src/process_manager.c` is unused dead code for job spawn (its `process_manager_start_process` is never called) but is still wired up for generic create/update/destroy/reap in `xcecd.c` Links against `libxce` from `src/lib/`. ## Conventions - C standard: gnu17 - Format with `clang-format` - Headers in `include/` - Shared types defined in `src/include/xce/` (libxce) ## See Also - Shared library: `src/lib/CLAUDE.md` - Root guidelines: `CLAUDE.md` (repo root)