Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8353439

Shell grouping of -XX:OnError= commands is surprising

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 25
    • core-svc
    • b18

      The -XX:OnError= option uses a semicolon as a separator. Items separated by a semicolor are run in separate shells or Windows Command sessions.

      The -XX:OnError= command-line option is accumulative, so each specification adds to the list of commands to run on a fatal error.

      Items added by additional OnError options are not run in a separate shell, they are run as a multi-line script passed to the shell. This works, but the grouping is odd. Commands specified in distinct OnError options run sequentially in the same shell, but items separate by a ; are in distinct shells.

      (Note that when multiple OnError options are specified, the shell DOES continue with all lines if an item fails. If an OnError item was bizarrely specified as "exit", then it will skip later OnError items.)

      We should be consistent, and run all OnError items in a new shell.

            kevinw Kevin Walls
            kevinw Kevin Walls
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: