pub struct PerProcessState {
pub virtual_cwd: Option<String>,
pub brk_base: Option<u64>,
pub cow_dir_cache: HashMap<u32, (String, Vec<Vec<u8>>)>,
pub procfs_dir_cache: HashMap<(u32, String), Vec<Vec<u8>>>,
}Expand description
All per-process supervisor state for one tracked child. One
instance lives per PidKey, owned by ProcessIndex behind an
Arc<AsyncMutex<…>>. Cleanup on process exit is one operation:
ProcessIndex::unregister drops the index’s Arc, and the
supervisor’s per-handler clones drop along with their tasks.
Fields§
§virtual_cwd: Option<String>Logical cwd while the process is chdir’d into a COW-only directory. None means “use kernel-reported cwd”.
brk_base: Option<u64>Recorded brk base for memory accounting. None until first brk.
cow_dir_cache: HashMap<u32, (String, Vec<Vec<u8>>)>COW directory dirent cache. Keyed by child’s fd; value is (host target path, sorted dirent bytes left to return). Entries are invalidated when the fd is reused for a different directory.
procfs_dir_cache: HashMap<(u32, String), Vec<Vec<u8>>>/proc directory dirent cache. Keyed by (child fd, target path); same drain-on-EOF semantics as cow_dir_cache.