I have a Java application that uses the Runtime.exec() method to run a bunch of Perl scripts. When the perl program exits, the java application retrieves the exit status of the perl process, and expects it to be 0. Anything other than 0 is treated as an error and the application does not proceed further.


On VMS, I observe that no matter what I do, I am never able to get it to return a value of 0. I tried the use of 'vmsish 'exit', but to no avail. If I create a simple script with just "exit 0;" in it, the value of $status on exit from the Perl program is always 1.

How do I get it to return a value of '0'. I am loathe to change the java code just for this.

Here's what I found searching through the VMS Perl archives:
-----

-=item C<vmsish exit>
-
-This makes C<exit 1> produce a successful exit (with status SS$_NORMAL),
-instead of emulating UNIX exit(), which considers C<exit 1> to indicate
-an error.  As with the CRTL's exit() function, C<exit 0> is also mapped
-to an exit status of SS$_NORMAL, and any other argument to exit() is
-used directly as Perl's exit status.
----

Note above it says the value '0' is always mapped to '1' !  I am hoping this 
can be bypassed somehow.


I am on Alpha OpenVMS Version 7.3-2, Perl version is 5.6.1.


Appreciate your inputs.

Thanks,
Sam



Reply via email to