This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug manual/17790] New: POSIX does not define EXIT_FAILURE as 1


https://sourceware.org/bugzilla/show_bug.cgi?id=17790

            Bug ID: 17790
           Summary: POSIX does not define EXIT_FAILURE as 1
           Product: glibc
           Version: 2.2.5
            Status: NEW
          Severity: minor
          Priority: P2
         Component: manual
          Assignee: unassigned at sourceware dot org
          Reporter: rhymoid at gmail dot com
                CC: mtk.manpages at gmail dot com, roland at gnu dot org

In the Glibc manual, the node 'Exit Status' mentions the following about
EXIT_FAILURE:

> On POSIX systems, the value of this macro is 1. On other systems, the value might be some other (possibly non-constant) integer expression. Other nonzero status values also indicate failures.

This wording has been used in version 2.2.3; I think it's safe to say that it
has always been there.

However, the POSIX specification does not seem to make any more requirements
regarding EXIT_SUCCESS and EXIT_FAILURE than the ISO C specification does. It
defines EXIT_FAILURE as such:

> Unsuccessful termination for exit(); evaluates to a non-zero value.

The current wording seems to imply that the POSIX specification defines
EXIT_FAILURE to have the value 1, while the POSIX specification does no such
thing. Even though it is *conventionally* true, I think the manual should not
suggest it is the *definition*.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]