Bash coproc: Bidirectional Pipes Without Building a Named-Pipe Protocol
How Bash coprocesses expose input, output, and PID handles, and how to manage descriptor lifetime, backpressure, framing, failures, and shutdown.
Bash, Zsh, sh, tcsh, and the TUI tools built on top of them - prompts, scripting, multiplexers, and terminal troubleshooting.
How Bash coprocesses expose input, output, and PID handles, and how to manage descriptor lifetime, backpressure, framing, failures, and shutdown.
How declare -n and local -n create references, work with arrays, follow dynamic scope, interact with unset, and avoid unsafe variable-name injection.
How the shell exec builtin replaces its process, preserves PID and selected descriptors, changes signal and trap behavior, and simplifies service wrappers.
How Bash mapfile preserves complete records in indexed arrays, handles delimiters and descriptors, appends safely, and avoids pipeline subshell loss.
Why compinit checks ownership and permissions in fpath, how compaudit exposes unsafe completion trees, and how to repair them without bypass flags.
How bracketed paste wraps pasted bytes, how line editors use the markers, where trust ends, and how terminal programs enable, parse, disable, and test it.
A control-flow model for shell errexit covering tested commands, lists, pipelines, functions, subshells, command substitutions, traps, and explicit errors.
A precise model of shell file descriptors, left-to-right redirection, duplication versus paths, grouping, pipelines, persistent descriptors, and safe logging.
A recovery and prevention guide for broken terminal state: blind reset commands, stty inspection, TTY targeting, job control, exact restoration, and traps.
A POSIX getopts pattern covering OPTIND, OPTARG, leading-colon diagnostics, required operands, repeated calls, function scope, and portable limitations.