RFR: 8362116: System.in.read() etc. don't accept input once immediate Ctrl+D pressed in JShell

Jan Lahoda jlahoda at openjdk.org
Mon Jul 14 12:54:15 UTC 2025


When in JShell, doing:

jshell> IO.readln();
//Ctrl-D
$1 ==> null

jshell> IO.readln()
$2 ==> null //no input allowed


Where relying input from the main process to the remote/agent process, need to propagate `-1` as `-1` without close, which is what this PR is attempting to do.

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

Commit messages:
 - 8362116: System.in.read() etc. don't accept input once immediate Ctrl+D pressed in JShell

Changes: https://git.openjdk.org/jdk/pull/26292/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26292&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8362116
  Stats: 84 lines in 5 files changed: 78 ins; 1 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/26292.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26292/head:pull/26292

PR: https://git.openjdk.org/jdk/pull/26292


More information about the compiler-dev mailing list