TIL

Today I learned.

One gotcha, one fix, under 200 words. The notes I wish the docs had led with.

  1. macOS has no timeout(1): perl alarm is the built-in substitute

    Stock macOS ships no timeout(1); it is a GNU coreutils tool. perl is on every Mac: alarm plus exec bounds any command with a hard deadline in one line, no polling loop and no extra install.

  2. zsh does not word-split unquoted variables like bash does

    bash splits an unquoted $flags string into separate arguments. zsh does not: SH_WORD_SPLIT is off by design, so the command gets one argument and rejects it. Use an array, or force the split with the = expansion flag.

  3. launchd caches a codesigning verdict until you bootout

    launchd holds onto the codesigning verdict it formed when a job was registered. Ship a rebuilt binary to the same path and the job dies on spawn with a stale verdict. The fix is bootout plus bootstrap, not another restart.