什么“标准"?应用程序应该支持应用程序返回/退出代码吗? [英] What "standard" application return/exit codes should an application support?

查看:35
本文介绍了什么“标准"?应用程序应该支持应用程序返回/退出代码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有标准的应用程序返回码集吗?诸如成功返回 0 失败返回 1 之类的事情?

Is there such thing as a standard set of application return codes? Things like returning 0 for success 1 for failure, and then so on?

我有一个 Windows Server 应用程序,我正在添加一些返回错误代码,除了我需要的特定于应用程序的代码之外,我还想坚持使用标准代码.

I have a Windows Server application that I am adding some return error codes and wanted to stick to standard codes in addition to the app specific ones that I will need.

推荐答案

没有应用程序应该遵循的标准退出代码集.

There is no such thing as a standard set of exit codes that applications should conform to.

但是,正如您提到的那样,有一些常见的成功,例如 0.根据您使用的操作系统和工具,您或许可以查看类似应用的退出代码并模仿它们.

However, there are some common ones like 0 for success as you mentioned. Depending on the Operating System and tools you use, you may be able to look at the exit codes for similar apps and mimic them.

这篇关于什么“标准"?应用程序应该支持应用程序返回/退出代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆