python - 返回代码与退出状态

标签 python process subprocess

我阅读了Python子进程模块的文档:https://docs.python.org/2/library/subprocess.html#subprocess.check_call

我很困惑。

The CalledProcessError object will have the return code in the returncode attribute.

下面几行:

subprocess.CalledProcessError: Command 'exit 1' returned non-zero exit status 1

这个东西叫什么名字?

返回代码退出状态

最佳答案

两者是同一个东西 - https://en.wikipedia.org/wiki/Exit_status

关于python - 返回代码与退出状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42947631/

相关文章:

python - 从 Python 2.7 中的列表中删除特定项目

linux - 为什么从用作监视服务的 bash 脚本启动的进程在脚本终止后仍然存在?

c# - 为什么无法获取已启动进程的主窗口句柄?

linux - linux下如何获取进程的总内存使用量和执行时间?

Python:从后台子进程获取标准输出

python - 从 python 内部调用 python 脚本

Python 子进程 : wait for command to finish before starting next one?

python - 不能再使用 pip

python - 在 Python 中可视化 T 分布时遇到问题

android - 通过蓝牙将字符串发送到 Arduino 上的 Android 设备