## Lesson — Implementing a trap for EXIT, INT, and TERM signals ensures

**Tags:** devops, shell, dx

Implementing a `trap` for EXIT, INT, and TERM signals ensures that temporary files are reliably cleaned up even if a developer interrupts a long-running hook.
