Anonymous | Login | 2024-03-29 01:11 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000957 | [1003.1(2013)/Issue7+TC1] Base Definitions and Headers | Editorial | Enhancement Request | 2015-06-10 17:41 | 2016-04-07 16:03 | ||
Reporter | steffen | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Rejected | ||||
Status | Closed | ||||||
Name | Steffen Nurpmeso | ||||||
Organization | |||||||
User Reference | |||||||
Section | XSH, stdlib.h | ||||||
Page Number | 358 | ||||||
Line Number | 12037 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | |||||||
Summary | 0000957: Add an extended set of exit status codes | ||||||
Description |
The ISO C(99) standard only defines the EXIT_SUCCESS (0) and EXIT_FAILURE (only seen as 1) constants as symbolic exit status codes. These are insufficient to express many real-life use cases, causing other digits in the usable 8-bit range to be selected rather randomly; e.g., -1 (or 255) is commonly used to manifest a fatal program error. Many systems and scripting languages offer (at least optionally) a set of extended exit status codes that is based upon the BSD /usr/include/sysexits.h constants. This header was first created on 1981-10-15 (by Eric Allman), and gained only three new constants over time: EX_TEMPFAIL (1981-10-15), EX_PROTOCOL (1982-08-29) and EX_NOPERM (1983-07-31). It can thus be seen as a mature interface. |
||||||
Desired Action |
Add symbolic exit status codes with the same values that are known for this long time, but with ISO C compatible names and in the same place as the usual ISO C status codes. On page 358, insert, after line 12037 [CX] EXIT_USAGE The command was used incorrectly, e.g., with the wrong number of arguments, a bad flag, a bad syntax in a parameter, or whatever. EXIT_DATAERR The input data was incorrect in some way. This should only be used for user's data & not system files. EXIT_NOINPUT An input file (not a system file) did not exist or was not readable. This could also include errors like "No message" to a mailer (if it cared to catch it). EXIT_NOUSER The user specified did not exist. This might be used for mail addresses or remote logins. EXIT_NOHOST The host specified did not exist. This is used in mail addresses or network requests. EXIT_UNAVAILABLE A service is unavailable. This can occur if a support program or file does not exist. This can also be used as a catchall message when something you wanted to do doesn't work, but you don't know why. EXIT_SOFTWARE An internal software error has been detected. This should be limited to non-operating system related errors as possible. EXIT_OSERR An operating system error has been detected. This is intended to be used for such things as "cannot fork", "cannot create pipe", or the like. It includes things like getuid returning a user that does not exist in the passwd database. EXIT_OSFILE Some system file does not exist, cannot be opened, or has some sort of error (e.g., syntax error). EXIT_CANTCREAT A (user specified) output file cannot be created. EXIT_IOERR An error occurred while doing I/O on some file. EXIT_TEMPFAIL Temporary failure, indicating something that is not really an error. In sendmail, this means that a mailer (e.g.) could not create a connection, and the request should be reattempted later. EXIT_PROTOCOL The remote system returned something that was "not possible" during a protocol exchange. EXIT_NOPERM You did not have sufficient permission to perform the operation. This is not intended for file system problems, which should use EXIT_NOINPUT or EXIT_CANTCREAT, but rather for higher level permissions. EXIT__BASE, EXIT__MAX The base and maximum value used for the extended POSIX status code sequence. [/CX] |
||||||
Tags | No tags attached. | ||||||
Attached Files | |||||||
|
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |