[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sysexits.h: Define EX_OK
From: |
Martin Lambers |
Subject: |
Re: sysexits.h: Define EX_OK |
Date: |
Fri, 7 Oct 2005 14:00:19 +0200 |
User-agent: |
Mutt/1.5.6+20040907i |
Since the future of the exit module is still unclear (at least to me),
and sysexits.h still does not define EX_OK, I'd like to bring this issue
up again.
I would prefer to define EX_OK to 0 for the following reasons:
1. Simplicity
2. This value is explicitly mentioned in the sysexits man page ("The
successful exit is always indicated by a status of 0, or EX_OK.") on
which the module was based.
3. Though EX_OK is semantically the same as EXIT_SUCCESS, I think of
EXIT_SUCCESS/EXIT_FAILURE and sysexits.h as two different things:
The first is a C89 language requirement that can improve the
readability of functions that must return success or failure.
The second is a collection of program exit codes that enables
programs (mostly mail related ones) in a UNIX environment to pass
more information about an error to the caller.
Martin
--- sysexit_h.orig 2005-08-24 17:47:34.966600112 +0200
+++ sysexit_h 2005-08-24 17:47:51.731051528 +0200
@@ -20,6 +20,7 @@
#ifndef _SYSEXITS_H
#define _SYSEXITS_H
+#define EX_OK 0
#define EX_USAGE 64
#define EX_DATAERR 65
#define EX_NOINPUT 66
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: sysexits.h: Define EX_OK,
Martin Lambers <=