简体   繁体   English

Windows是否有等同于标准(ish)UN * X进程退出代码的Windows?

[英]Is there a Windows equivalent of standard(ish) UN*X process exit codes?

I need to decide which exit code to exit() with in different scenarios. 我需要确定在不同情况下使用exit()退出的代码。 I just read 我刚读

Are there any standard exit status codes in Linux? Linux中是否有任何标准的退出状态代码?

but I need to write something that is (sort of) cross-platform Linux+Windows. 但是我需要写一些(或多类)跨平台的Linux + Windows。 MS Windows does not seem to have something like /usr/include/sysexits.h ; MS Windows似乎没有类似/usr/include/sysexits.h it only has C89's stdlib.h , which provides 它只有C89的stdlib.h ,它提供

#define EXIT_SUCCESS    0
#define EXIT_FAILURE    1

So are these two the only thing that's portable? 那么,这两个是唯一可移植的东西吗? Or does Windows have some more elaborate platform-standard exit codes? 还是Windows有一些更详尽的平台标准退出代码?

Note: I don't mean the System Error Codes of course. 注意:我当然不是指系统错误代码

Is there a Windows equivalent of standard(ish) UN*X process exit codes? Windows是否有等同于标准(ish)UN * X进程退出代码的Windows?

No, as in practise there are not IXis standard exit codes (besides that 0 indicates success and everything else something else). 不,因为实际上没有IXis标准退出代码(除了0表示成功,其他都没有)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM