ExitStatus.exitCode(_:)
The process exited with the given exit code.
Declaration
case exitCode(CInt)Parameters
- exitCode:
The exit code reported by the process.
Discussion
The C programming language defines two standard exit codes, EXIT_SUCCESS and EXIT_FAILURE. Platforms may additionally define their own non-standard exit codes:
Platform | Header |
|---|---|
macOS | |
Linux | |
FreeBSD | |
OpenBSD | |
Windows |
On macOS, FreeBSD, OpenBSD, and Windows, the full exit code reported by the process is reported to the parent process. Linux and other POSIX-like systems may only reliably report the low unsigned 8 bits (0–255) of the exit code.