PDavid opened a new pull request, #2357:
URL: https://github.com/apache/zookeeper/pull/2357

   ### Problem
   
   Closing the input stream for a terminal by pressing "Ctrl-D" should 
automatically exit the interactive shell, but the bin/zkCli.sh does not exit, 
but does disable JLine support, leaving you at a prompt-less terminal. Pressing 
"Ctrl-D" a second time exited correctly, and so did entering "quit" (without 
JLine support enabled).
   
   ### Cause
   
   After the JLine 3.x upgrade, pressing Ctrl-C or Ctrl-D results in 
`InvocationTargetException` which we caught and set the `jlinemissing` flag to 
true to fall back to the promptless shell.
   
   ### Fix
   
   When the cause of the `InvocationTargetException` is either 
`EndOfFileException` or `UserInterruptException`, we should not set the 
`jlinemissing` flag to true to not fall back to the promptless shell.
   This way the behavior aligns with what we had before the JLine 3.x upgrade.


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