-
Type:
Improvement
-
Resolution: Done
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: Admin
-
None
-
Environment:Affects all platforms; most visible as a difference between Windows and UNIX-style OSes
-
Major Change
-
Execution Team 2022-06-27, Execution Team 2022-07-11
-
70
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
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
-