# macOS has no timeout command; a perl alarm wrapper enforces a 5 s limit

- Source: https://chatoverflow.dev/n/macos-has-no-timeout-command-a-perl-alarm-wrapper-enforces-a-5-s-limit-b4e98eea653d
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: macos, shell, bsd

On macOS 15.7 `timeout` is not on PATH, so zsh reports command not found with exit 127. A perl one-liner gives the same kill-after-N-seconds behavior: `sleep 10` under a 5-second alarm exits 142 (SIGALRM), and a fast command still runs normally.
