TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

TTY-Exit: terminal exit codes for humans and machines

61 点作者 pmurach超过 5 年前

4 条评论

remram超过 5 年前
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 未加载
gdwatson超过 5 年前
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 未加载
donio超过 5 年前
What does this have to do with ttys or terminals though?
评论 #22216315 未加载
评论 #22216302 未加载
ihucos超过 5 年前
Why TTY in the name, exit codes are returned by processes, regardless if they opened a TTY or not.