unix
7 minUnix Signals and Child Processes: What Your Service Must Clean Up
Follow signals from a container stop through shell wrappers and child processes, and build shutdown behavior that preserves work.
Loading page...
unix
7 minFollow signals from a container stop through shell wrappers and child processes, and build shutdown behavior that preserves work.
distributed systems
6 minProtect a shared resource from stale owners instead of assuming expired leases stop processes.
Q&A
Q&AInodes may be exhausted, or deleted files may still be held open by running processes.
Compare df -h with df -i. If block usage and directory totals disagree, inspect open-but-deleted files with lsof +L1. A process retains allocated blocks until it closes the file; restart or signal the owning service through its safe lifecycle after confirming the file is disposable.
Q&A
Q&AEnvironment strings and open descriptors not marked close-on-exec.
Construct a deliberate environment and descriptor allowlist. Descriptors grant capabilities to files, sockets, or pipes; inherited writers can delay EOF and inherited secrets can leak to less-trusted children.
unix
8 minUnix is full of tiny control primitives. Learn how `set -o pipefail`, process signals, and clean lifecycle management keep shell pipelines reliable and debuggable.
devops
6 minGive retries a stable business identity without confusing schedule windows with process start times.
unix
8 minTrace what survives fork and exec, and close capabilities a child should not inherit.
Q&A
Q&AUse grep to select lines, sed for stream edits, and awk for field-based filtering and calculations.
grep selects matching lines; sed applies stream transformations such as substitutions; awk processes records and fields. Quote patterns for the shell, test edits on copied input, and do not treat default awk splitting as a full CSV parser. For structured formats or complex quoting, use a format-aware parser.