subprocess.exitCode
- 类型:<integer>
subprocess.exitCode 属性表示子进程的退出代码。如果子进程仍在运行,该字段将为 null。
🌐 The subprocess.exitCode property indicates the exit code of the child process.
If the child process is still running, the field will be null.
当子进程被信号终止时,subprocess.exitCode 将是 null,并且 subprocess.signalCode 将被设置。要获取相应的 POSIX 退出代码,请使用 util.convertProcessSignalToExitCode(subprocess.signalCode)。
🌐 When the child process is terminated by a signal, subprocess.exitCode will be
null and subprocess.signalCode will be set. To get the corresponding
POSIX exit code, use
util.convertProcessSignalToExitCode(subprocess.signalCode).