Recent twts in reply to #kzjdhia

Oh, this is interesting! Reading the Crafting Interpreters book, I came across a table of exit codes in FreeBSD.

I didn’t know that a command line usage error is supposed to report exit code 64. In the past I either simply exited with 1 or sometimes each exit statement got its own dedicated number. The latter came in useful for debugging shell scripts. I exactly knew which branch was executed. That was handy when the error messages were similar or even the same.

I was always wondering if there is some kind of a standard, but I never did my reasearch. Looking at other people’s code, it always seemed to me that everybody just did wantever they wanted to in regards to exit codes. I just looked up what else is out there and systemd also defines heaps of errors. It even references the FreeBSD one and links to the Linux Standard Base specification, too. Cool, cool!

Do you guys know of these conventions and make use of them?

⤋ Read More

@prologic@twtxt.net Your message got a bit mangled up I reckon, not sure if I understand it. I don’t find these lists hard to read. The question is more, which of the standards do you follow? I doubt that another package really helps a lot. I mean, one can just use the codes already if one wanted to.

⤋ Read More


Login or Register to join in on this yarn.