frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Native macOS timeout (Rust) – handles system sleep, no coreutils

https://github.com/denispol/darwin-timeout
3•denispol•2mo ago
I built a dependency-free replacement for GNU timeout on macOS.

The main differentiator is the clock source: GNU timeout relies on nanosleep, which pauses if the machine sleeps. This tool uses mach_continuous_time. If you set a 1-hour timeout and close your lid for 2 hours, this kills the process immediately upon wake. GNU would wait another hour.

Written in Rust, ~500KB static binary, and includes --json output for parsing in CI pipelines, as well as extra tiny features.