The subprocess.exitCode property indicates the exit code of the child process. If the child process is still running, the field will be null.
property
child_process.ChildProcess.exitCode
readonly exitCode: null | number