RFR: 8325567: jspawnhelper without args fails with segfault

Roger Riggs rriggs at openjdk.org
Tue Mar 5 17:58:46 UTC 2024


On Mon, 4 Mar 2024 23:54:38 GMT, Vladimir Petko <vpetko at openjdk.org> wrote:

>> test/jdk/java/lang/ProcessBuilder/JspawnhelperProtocol.java line 111:
>> 
>>> 109:         if (p.exitValue() != 1)
>>> 110:             System.exit(ERROR + 2);
>>> 111:         System.exit(0);
>> 
>> Its bad form to System.exit from not at the top level. Is that necessary.
>
> This is in line with other tests in this file , e.g. see `parentCode()`. 
> 
> I agree that code would be cleaner if the test is refactored to return error code from the test methods and system.exit() in the main instead, but this might be a separate pr done before or after this one, e.g. something like [1].
> 
> [1] https://github.com/vpa1977/jdk/commit/7cbbaf498da8b71476e61e1c0f3fa7882c7aa7b6

ok, the same pattern is used consistently.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18112#discussion_r1513262005


More information about the core-libs-dev mailing list