Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
When I was designing the programmatic API for my programmer's spell checker [0], I found that it was easy to get an exit code from something else in the stack and if they all used 1, there wasn't a way to differentiate. This is the reason I went with sysexists, so I would have a more nuanced codes to reduce the probability of two processes in the stack returning confusable errors.
I do something very similar, though I read I should avoid codes 1 and 2 so my error codes start at 3: https://github.com/RPGillespie6/fastcov/blob/master/fastcov....
That way automated CI pipelines (or whatever) can switch on the return code if needed rather than try to parse stderr
It exists on any UNIX, basically. It was added 40 years ago: https://github.com/dspinellis/unix-history-repo/commit/8e0a2...