pipe-tail-masks-script-exit-code
When checking exit codes of Python/shell scripts piped through tail (e.g., python3 script.py | tail -20; echo $?), $? returns tail’s exit code, not the script’s. This produced a false C2 critic finding claiming lint scripts exit 0 on failure. Use ${PIPESTATUS[0]} or avoid piping when verifying exit behavior.
Related
- piped-tail-masks-script-exit-code
- pipe-tail-captures-tail-exit-not-script-exit
- pipe-tail-corrupts-exit-code-verification
- parallel-critic-agents-require-spot-verification
- structural-vs-semantic-lint-extend-before-trust
- tail-pipe-corrupts-exit-code-verification
- pipe-through-tail-masks-script-exit-code
- piped-command-exit-code-masks-primary-script-result