# vtcode-process-hardening
## Platform Matrix
All Unix: cap `RLIMIT_STACK` to 8 MiB if unlimited.
## Rules
- All `unsafe` must have `// SAFETY:` comments.
- Exit codes: `PRCTL_FAILED=5`, `PTRACE_DENY_ATTACH_FAILED=6`, `SET_RLIMIT_CORE_FAILED=7`.
- Platform code via `#[cfg(target_os)]` at function level.
## Gotchas
- `remove_env_var` must run before thread spawn — unsafe env mutation.
- `cap_stack_rlimit` silently returns on EINVAL — intentional.
- Windows hardening is placeholder — do not assume it works.