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

Chen Liang liach at openjdk.org
Mon Jul 14 15:29:40 UTC 2025


On Mon, 14 Jul 2025 15:26:04 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> 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.

Looks reasonable.

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

Marked as reviewed by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26292#pullrequestreview-3016799705


More information about the compiler-dev mailing list