jshell keeps running after closing console

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • None
    • Affects Version/s: 12.0.2
    • Component/s: tools
    • x86_64
    • windows_10

      A DESCRIPTION OF THE PROBLEM :
      When closing the console in which jshell was started, it keeps running if it is currently executing something. This is not obvious to the user and not consistent with the behavior of `java.exe`.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Open "Command Prompt" (or PowerShell)
      2. Start jshell
      3. Execute code which runs in an infinite loop, e.g.: for (int i = 0;; i++) { }
      4. Close the "Command Prompt" window

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      jshell is terminated
      ACTUAL -
      jshell keeps running in the background, this can be verified using the Task Manager

      CUSTOMER SUBMITTED WORKAROUND :
      Force terminate running code by pressing `Ctrl` + `C` before closing the console window
      Or use the Task Manager or similar tools to terminate the jshell process afterwards

      FREQUENCY : always


            Assignee:
            Fairoz Matte
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: