diff options
author | Jim Meyering <jim@meyering.net> | 2004-01-22 21:02:22 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-01-22 21:02:22 +0000 |
commit | 78ac13ca26739bdb46a6d0144f55d3870692944e (patch) | |
tree | 845e405c77ed194c113e1b05d28912b2e58a4fd3 /src | |
parent | bfa5295dc08722b03cd14c4eab46d205eb6aa438 (diff) | |
download | coreutils-78ac13ca26739bdb46a6d0144f55d3870692944e.tar.xz |
(initialize_exit_failure): New inline function.
Include exitfail.h here, since we refer to exit_failure.
All callers changed to not include exitfail.h.
(EXIT_FAIL, EXIT_CANNOT_INVOKE, EXIT_ENOENT): New enum values.
Diffstat (limited to 'src')
-rw-r--r-- | src/system.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h index e82cec7a2..5bdaf88f2 100644 --- a/src/system.h +++ b/src/system.h @@ -148,6 +148,25 @@ extern int errno; # define EXIT_SUCCESS 0 #endif +/* 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, + EXIT_CANNOT_INVOKE = 126, + EXIT_ENOENT = 127 +}; + +#include "exitfail.h" + +/* Set exit_failure to STATUS if that's not the default already. */ +static inline void +initialize_exit_failure (int status) +{ + if (status != EXIT_FAILURE) + exit_failure = status; +} + #if HAVE_FCNTL_H # include <fcntl.h> #else |