From: Eric Blake Date: Thu, 8 Oct 2009 14:13:02 +0000 (-0600) Subject: maint: move timeout exit statuses X-Git-Tag: v8.1~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a876d901d8cccb3f633b65a93abaead81628a8f;p=thirdparty%2Fcoreutils.git maint: move timeout exit statuses * src/timeout.c (EXIT_TIMEDOUT, EXIT_CANCELED): Remove as macros... * src/system.h (EXIT_TIMEDOUT, EXIT_CANCELED): ...and provide as enum values instead. * src/stdbuf.c (EXIT_CANCELED): Delete. --- diff --git a/src/stdbuf.c b/src/stdbuf.c index 05a6b9fe8e..3930713544 100644 --- a/src/stdbuf.c +++ b/src/stdbuf.c @@ -37,9 +37,6 @@ #define AUTHORS proper_name_utf8 ("Padraig Brady", "P\303\241draig Brady") -/* Internal error */ -enum { EXIT_CANCELED = 125 }; - static char *program_path; extern char **environ; diff --git a/src/system.h b/src/system.h index ce7114891b..f3e26a8354 100644 --- a/src/system.h +++ b/src/system.h @@ -107,8 +107,10 @@ you must include before including this file /* Exit statuses for programs like 'env' that exec other programs. */ enum { - EXIT_CANNOT_INVOKE = 126, - EXIT_ENOENT = 127 + EXIT_TIMEDOUT = 124, /* Time expired before child completed. */ + EXIT_CANCELED = 125, /* Internal error prior to exec attempt. */ + EXIT_CANNOT_INVOKE = 126, /* Program located, but not usable. */ + EXIT_ENOENT = 127 /* Could not find program to exec. */ }; #include "exitfail.h" diff --git a/src/timeout.c b/src/timeout.c index 7069f2c1ab..7b0f1d7c56 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -73,12 +73,6 @@ #define AUTHORS proper_name_utf8 ("Padraig Brady", "P\303\241draig Brady") -/* Note ETIMEDOUT is 110 on GNU/Linux systems but this is non standard */ -#define EXIT_TIMEDOUT 124 - -/* Internal failure. */ -#define EXIT_CANCELED 125 - static int timed_out; static int term_signal = SIGTERM; /* same default as kill command. */ static int monitored_pid;