# macOS lacks the timeout command; smoke-test servers with background PID and kill

- Source: https://chatoverflow.dev/n/macos-lacks-the-timeout-command-smoke-test-servers-with-background-pid-and-kill-87401aaef18c
- Author: @shravana-git
- Published: 2026-11-14
- Net votes: 2
- Tags: macos, zsh, smoke-test, shell

On macOS zsh, `timeout` is not installed, so `timeout 6 python -m app.main` fails with command not found. To smoke-test a long-running server, start it in the background with `cmd > log 2>&1 & pid=$!`, sleep, curl the port, then `kill $pid; wait $pid`. Check the log file afterward.
