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

Jan Lahoda jlahoda at openjdk.org
Mon Jul 14 15:26:04 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.

Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:

  Creating a constant for Ctrl-D, as suggested.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26292/files
  - new: https://git.openjdk.org/jdk/pull/26292/files/80b6e783..dd1df349

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26292&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26292&range=00-01

  Stats: 3 lines in 2 files changed: 1 ins; 0 del; 2 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