develooper Front page | perl.perl5.porters | Postings from August 2001

Re: [PATCH perl@11597] fix t/run/exit.t for VMS

Thread Previous
From:
Jarkko Hietaniemi
Date:
August 7, 2001 20:35
Subject:
Re: [PATCH perl@11597] fix t/run/exit.t for VMS
Message ID:
20010807223509.E22161@chaos.wustl.edu
On Tue, Aug 07, 2001 at 10:27:47PM -0500, Craig A. Berry wrote:
> This is a bit messy but I think is the best I can do in the three-way 
> struggle for exit values among Perl, VMS, and POSIX.

Both this and the doc patch applied, thanks.
 
> --- t/run/exit.t;-0     Wed Aug  1 09:39:39 2001
> +++ t/run/exit.t        Tue Aug  7 21:50:45 2001
> @@ -55,5 +55,13 @@
>    is( $exit >> 8, 4,             'fatal error exit' );
>  }
>  
> -$exit = run('END { $? = 42 }');
> -is( $exit >> 8, 42,             'Changing $? in END block' );
> +$exit_arg = 42;
> +$exit = run("END { \$? = $exit_arg }");
> +
> +# On VMS, in the child process the actual exit status will be SS$_ABORT, 
> +# which is what you get from any non-zero value of $? that has been 
> +# dePOSIXified by STATUS_POSIX_SET.  In the parent process, all we'll 
> +# see are the severity bits (0-2) shifted left by 8.
> +$exit_arg = (44 & 7) if $^O eq 'VMS';  
> +
> +is( $exit >> 8, $exit_arg,             'Changing $? in END block' );
> [end of patch]

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About