gnodet opened a new pull request, #23446:
URL: https://github.com/apache/camel/pull/23446

   ## Summary
   
   - Reverts JLine from 4.1.0 to 4.0.15 to fix `camel shell` exiting 
immediately after printing the banner.
   
   ## Root cause
   
   JLine 4.1.0 introduced `AbstractUnixSysTerminal`, which bypasses the PTY 
abstraction and reads directly from `new FileInputStream(FileDescriptor.in)`. 
Combined with a latent bug in `enterRawMode()` that sets `VMIN=0, VTIME=1` 
(instead of the POSIX `cfmakeraw` defaults `VMIN=1, VTIME=0`), the kernel 
returns 0 bytes from `read()` after 100ms idle. Java's `FileInputStream.read()` 
translates a 0-byte return into `-1` (EOF), causing JLine's `readLine()` to 
throw `EndOfFileException` and the shell REPL to exit silently.
   
   JLine 4.0.15 uses PTY-backed I/O (`pty.getSlaveInput()`) which handles 
0-byte returns correctly, so the shell works as expected.
   
   The upstream fix is in [JLine PR 
#1871](https://github.com/jline/jline3/pull/1871) (`VMIN=1, VTIME=0`) but has 
not been released yet. Once a JLine release includes this fix, we can upgrade 
again.
   
   ## Test plan
   
   - [x] `camel shell` stays open and accepts commands (tested with both 4.0.15 
and the SNAPSHOT with the fix)
   - [ ] CI passes
   
   _Claude Code on behalf of Guillaume Nodet_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to