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

jshell keeps running after closing console

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 12.0.2
    • 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


            fmatte Fairoz Matte
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: