TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

TTY-Exit: terminal exit codes for humans and machines

61 pointsby pmurachover 5 years ago

4 comments

remramover 5 years ago
I&#x27;m not totally sure what the point of this is. This is advertised as exit codes &quot;for humans and machines&quot;, however<p>* humans will always get way more information from a readable error message printed to stderr before exiting<p>* machines do not care about error details from third-party tools, apart from whether they are an input error (which can be blamed on the user, if they provided said input) or an internal error (including usage error) which is a bug and should be fixed by the calling program&#x27;s developer<p>Indeed, the README has a lot of examples of using it in your child program, to report error, but no example of a parent program dealing with the reported error.
评论 #22214312 未加载
评论 #22215968 未加载
gdwatsonover 5 years ago
It seems to be a Ruby equivalent to sysexits.h.[1] I don&#x27;t know how widely used the codes are, but the idea is neat.<p>[1] <a href="https:&#x2F;&#x2F;manpage.me&#x2F;index.cgi?apropos=0&amp;q=sysexits&amp;sektion=0&amp;manpath=FreeBSD+12-RELEASE&amp;arch=default&amp;format=html" rel="nofollow">https:&#x2F;&#x2F;manpage.me&#x2F;index.cgi?apropos=0&amp;q=sysexits&amp;sektion=0&amp;...</a>
评论 #22214184 未加载
评论 #22216297 未加载
评论 #22215647 未加载
donioover 5 years ago
What does this have to do with ttys or terminals though?
评论 #22216315 未加载
评论 #22216302 未加载
ihucosover 5 years ago
Why TTY in the name, exit codes are returned by processes, regardless if they opened a TTY or not.