All users were logged out of Bugzilla on October 13th, 2018

rhino exits the JVM even when run as a subshell of another java shell

UNCONFIRMED
Unassigned

Status

UNCONFIRMED
6 years ago
6 years ago

People

(Reporter: raymond.auge, Unassigned)

Tracking

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.36 Safari/537.22

Steps to reproduce:

Created a wrapper which allows shubshelling rhino in a java based gogo shell.


Actual results:

While rhino works fine as a subshell, simply passing incorrect usage args or requesting the -help (-?) results in termination of the entire JVM.

This is due to rhino using System.exit(1) as branch termination logic while analyzing the arguments.


Expected results:

Had parsing simply set and later checked an exitCode after processing arguments but before further evaluation, the rhino shell could simply return with a normal exitCode to the outer shell.
You need to log in before you can comment on or make changes to this bug.