RFR: 8353439: Shell grouping of -XX:OnError= commands is surprising [v2]

David Holmes dholmes at openjdk.org
Sun Apr 6 22:41:49 UTC 2025


On Fri, 4 Apr 2025 14:33:04 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

>> We should be consistent, and run all OnError items in a new shell.  Currently the ; separator causes a new shell, but multiple -XX:OnError= options are grouped into the same shell.
>> 
>> next_OnError_command() decides on where a new command starts.  It should recognise newlines, and all commands will get their own shell.
>
> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Test udpate - multiple -XX:OnError=

Okay I'm satisfied this change is not likely to cause any problems for existing usages.

One comment suggestion, but approval in advance.

Thanks.

src/hotspot/share/utilities/vmError.cpp line 149:

> 147: 
> 148:   // skip leading blanks, ';' or newlines
> 149:   while (*cmd == ' ' || *cmd == ';' || *cmd == '\n') cmd++;

It may be worth reinstating a comment in the function description to explain how the command is actually parsed (we seem to have lost that somewhere along the line) e.g.

// The command string is expected to be a semi-colon, or newline, delineated sequence of commands,
// that are executed sequentially and in their own shell environment.

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24354#pullrequestreview-2745295405
PR Review Comment: https://git.openjdk.org/jdk/pull/24354#discussion_r2030291361


More information about the hotspot-dev mailing list