[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
EXIT_FAIL vs. EXIT_FAILURE
From: |
Eric Blake |
Subject: |
EXIT_FAIL vs. EXIT_FAILURE |
Date: |
Tue, 28 Aug 2007 21:37:38 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
system.h currently has:
/* Exit statuses for programs like 'env' that exec other programs.
EXIT_FAILURE might not be 1, so use EXIT_FAIL in such programs. */
enum
{
EXIT_FAIL = 1,
But gnulib's stdlib_.h has:
/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
with proper operation of xargs. */
#ifndef EXIT_FAILURE
# define EXIT_FAILURE 1
#elif EXIT_FAILURE != 1
# undef EXIT_FAILURE
# define EXIT_FAILURE 1
#endif
In other words, thanks to gnulib, EXIT_FAILURE is guaranteed to be 1. Is there
any reason to keep EXIT_FAIL in coreutils sources any more?
--
Eric Blake
- EXIT_FAIL vs. EXIT_FAILURE,
Eric Blake <=