Second Brain

Home

❯

_archive

❯

cleanup 2026 04 17 conversation flush bulk

❯

knowledge

❯

critical

❯

pipe tail corrupts exit code verification

pipe-tail-corrupts-exit-code-verification

Apr 17, 20261 min read

  • x/claude-code
  • infra/monitoring
  • ops/deploy

pipe-tail-corrupts-exit-code-verification

When verifying script exit codes, piping through tail (e.g., script.py | tail -n 5; echo $?) captures tail’s exit code, not the script’s. This caused a false CRITICAL finding during the Helix audit where lint scripts were wrongly flagged as broken. Always capture exit code before piping: script.py > output.txt; echo $? or use ${PIPESTATUS[0]}.

Related

  • hypervisor-steal-time-misread-as-process-cpu
  • docker-unless-stopped-insufficient-for-critical-services
  • docker-daemon-json-log-rotation-already-configured-system-wi
  • prometheus-unless-stopped-fails-silently-on-dirty-exit
  • helix-lint-scripts-exit-zero-on-failure
  • piped-tail-masks-script-exit-code
  • pipe-tail-captures-tail-exit-not-script-exit
  • pipe-tail-masks-script-exit-code
  • tail-pipe-corrupts-exit-code-verification
  • pipe-through-tail-masks-script-exit-code
  • piped-command-exit-code-masks-primary-script-result
  • pipe-through-tail-captures-tails-exit-code-not-scripts
  • makefile-awk-help-regex-must-include-digit-character-class

Graph View

  • pipe-tail-corrupts-exit-code-verification
  • Related

Backlinks

  • docker-unless-stopped-insufficient-for-critical-services
  • hypervisor-steal-time-misread-as-process-cpu
  • pipe-tail-captures-tail-exit-not-script-exit
  • pipe-tail-masks-script-exit-code
  • pipe-through-tail-captures-tails-exit-code-not-scripts
  • pipe-through-tail-masks-script-exit-code
  • piped-command-exit-code-masks-primary-script-result
  • piped-tail-masks-script-exit-code
  • tail-pipe-corrupts-exit-code-verification
  • makefile-awk-help-regex-must-include-digit-character-class

Created with Quartz v4.5.2 © 2026

  • CIOS
  • Mission Control