Michael G Schwern wrote:
On Tue, Sep 20, 2005 at 08:09:56AM -0400, John E. Malmberg wrote:
A VMS exit 44 will also cause MMS/MMK by default to abort the makefile
with MMS/MMK also exiting with an error.
I believe this is the desired behavior.
I think I should test that out tonight by aliasing the false command to
signal a 44 status and see what happens.
Somehow I have a feeling that it will cause the entire cleanup operation
to be aborted before it completes as the failure code gets signaled back
through to the parent processes.
Exit codes on VMS are signals, not just status conditions, and they can
have side effects unless they are trapped or suppressed by the shell.
Having the false command signal a SUCCESS status seems to be working in
that the REALCLEAN target works.
I have not tried the DISTCLEAN target.
If you want a VMS exit code that UNIX programs should interpret as an
EXIT 1, then the following (mostly undocumented) hack will work.
VMS status code = %x35a000 + (UNIX status * 8), and if this is a success
status, add 1, otherwise VMS will interpret it as a warning.
EAGLE> exit %x35A000 + (1 * 8) + 1
EAGLE> x = %x35A000 + (1 * 8) + 1
EAGLE> show sym x
X = 3514377 Hex = 0035A009 Octal = 00015320011
I have no idea what any of this means.
Neither would most VMS programmers, which is why their programs written
in C sometimes have random weird side effects. Most of the time they
get away with it, and many times the error handling in the DCL shell
must be suppressed while those programs are running.
The above is a bit ugly. And it is not properly documented either,
which is why I probably need to look at what perlport.pod is saying
about VMS exit values.
Back when the C language was added to VMS, there were a few things that
were mis-understood about mapping UNIX concepts to VMS concepts, and
this is an example of one of them.
-John
[EMAIL PROTECTED]
Personal Opinion Only