> I don't really know the answer to your question but it's probably lurking in 
> the following section of perl.h.  It appears to be converting VMS condition 
> codes to some other (POSIX?) exit statuses.  In pp_sys.c there is a call to 
> STATUS_NATIVE_SET with the return value of Perl_do_spawn().  What I find 
> particulary puzzling here is that after extracting the severity bits (0-2) 
> the result is shifted left by 8.  How can the VMS severity bits have any 
> meaning when shoved up one byte?

The shift is an attempt to accomodate POSIX semantics for subprocess
termination values returned to wait(), which call for the low-order
byte to contain flags, and the higher-order bits to contain the actual
exit status of the subprocess.  Since I couldn't preserve the whole
VMS status value after the shift, I at least tried to hang onto the
severity info without creating a spurious (partial) VMS status value.
If the caller really wants to know what happened, it's best to go
for the real VMS status; the default behavior was at the insistence
of the POSIX police for the sake of portability.

Regards,
Charles Bailey  [EMAIL PROTECTED]

Reply via email to