According to the various standards governing Unix-y systems, only the low-order 8 bits of exit codes are returned to parent processes, meaning that parent processes only see exit code values between 0 and 255.
Several MongoDB executables use negative numbers for error exit codes, so _exit(-3) shows up in the shell as exit code 253.
Windows does not follow this convention, so _exit(-3) shows an exit code of -3.
It would enhance cross-platform compatibility and assist documentation if exit codes were restricted to values that will work on all platforms.
- is related to
-
SERVER-5098 mongos process exit codes are haphazard and hardcoded
- Closed