From 8de07f3e4a67fa1c9bd5293d183090ad08b7be6f Mon Sep 17 00:00:00 2001 From: Hartmut Becker Date: Sun, 24 Aug 2014 22:06:15 +0200 Subject: Enhance/fix VMS exit code handling. * commands.c, function.c, hash.c, job.c, main.c, output.c: use MAKE exit codes. * makeint.h: encode make exit codes so that they are VMS compatible. * job.c: check child exit code for VMS style exit codes. * vmsjobs.c: save and return VMS style exit code. --- makeint.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'makeint.h') diff --git a/makeint.h b/makeint.h index 5133cf1..2237077 100644 --- a/makeint.h +++ b/makeint.h @@ -630,10 +630,14 @@ extern int handling_fatal_signal; #define MAX(_a,_b) ((_a)>(_b)?(_a):(_b)) #endif + #ifdef VMS -# define MAKE_SUCCESS 1 -# define MAKE_TROUBLE 2 -# define MAKE_FAILURE 3 +/* These are the VMS __posix_exit compliant exit codes, constructed out of + STS$M_INHIB_MSG, C facility code, a POSIX condition code mask, MAKE_NNN<<3 and + the coresponding VMS severity, here STS$K_SUCCESS and STS$K_ERROR. */ +# define MAKE_SUCCESS 0x1035a001 +# define MAKE_TROUBLE 0x1035a00a +# define MAKE_FAILURE 0x1035a012 #else # define MAKE_SUCCESS 0 # define MAKE_TROUBLE 1 -- cgit v1.2.3