Java 程序退出,代码为“130”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29887088/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 08:46:16  来源:igfitidea点击:

Java program exit with code "130"

javaintellij-idea

提问by Nicolas S.Xu

When I close a java program in intellJ, the following log appears in the console: "Process finished with exit code 130"

当我在 intellJ 中关闭 java 程序时,控制台中会出现以下日志:“进程已完成,退出代码为 130”

screenshot of java program exit code

java程序退出代码截图

Some times, the code is "1".

有时,代码是“1”。

I know this is the very basic, but I googled Internet and still couldn't find the explanation for the exit code.

我知道这是非常基本的,但我在互联网上搜索了谷歌,仍然找不到退出代码的解释。

What does the code mean? Where can I find the explanation?

代码是什么意思?我在哪里可以找到解释?

回答by Sinkingpoint

To steal @Baby 's answer from the comments and formalize it, thisstates that the 130 exit code is given by bash, and indicates that the process was terminated by the user pressing Ctrl-C.

为了从评论中窃取@Baby 的答案并将其形式化,表明 130 退出代码是由 bash 给出的,并表明该进程已被用户按 Ctrl-C 终止。