[SERVER-9434] Process exit codes should be between 0 and 255 Created: 23/Apr/13 Updated: 14/Jul/22 Resolved: 07/Jul/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.0-rc0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Tad Marshall | Assignee: | Matt Kneiser |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Affects all platforms; most visible as a difference between Windows and UNIX-style OSes |
||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Major Change | ||||||||||||||||||||
| Sprint: | Execution Team 2022-06-27, Execution Team 2022-07-11 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 70 | ||||||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 14/Jul/22 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 07/Jul/22 ] |
|
Author: {'name': 'Matt Kneiser', 'email': 'matt.kneiser@mongodb.com', 'username': 'themattman'}Message:
|
| Comment by Githook User [ 07/Jul/22 ] |
|
Author: {'name': 'Matt Kneiser', 'email': 'matt.kneiser@mongodb.com', 'username': 'themattman'}Message: Propagates new `ExitCode` convention to the Enterprise module |
| Comment by Eliot Horowitz (Inactive) [ 23/Apr/13 ] |
|
should make it such that the *nix return codes do not change |