Hi,

Yes, that’s it. Sorry, I was off earlier today ;)

Regards
JB

> Le 18 avr. 2021 à 11:58, Васил Зорев <[email protected]> a écrit :
> 
> Found it i think, it's exactly the place that throws the eofexception in the 
> jline reader:
> 
> if (this.buf.length() == 0 && this.getLastBinding().charAt(0) == 
> originalAttributes.getControlChar(ControlChar.VEOF)) {
>     throw new EndOfFileException();
> }
> 
> Thank you again :)
> 
> На нд, 18.04.2021 г. в 12:41 ч. Васил Зорев <[email protected] 
> <mailto:[email protected]>> написа:
> Hi JB,
> 
> Thank you for your response, and sorry for the many emails from my side this 
> weekend.. :)
> 
> I found this place 
> org.apache.karaf.shell.impl.console.JLineTerminal#handle(org.jline.terminal.Terminal.Signal)
> And it already handles Ctrl+C, but seems not to be called for Ctrl+D. Is this 
> handled in a different way? Please take your time, I don't mean to flood you 
> specifically with such questions.
> 
> Regards,
> Vassil
> 
> На нд, 18.04.2021 г. в 10:23 ч. JB Onofré <[email protected] 
> <mailto:[email protected]>> написа:
> Hi
> 
> It’s managed at terminal level. 
> 
> With local console/terminal ctrl-d is trapped and stop Karaf (like halt 
> command). 
> 
> With ssh terminal ctrl-d just close the ssh client but of course not Karaf 
> runtime itself. 
> 
> It’s on the terminal impl (and console session). 
> 
> Regards 
> JB
> 
> > Le 17 avr. 2021 à 11:19, Васил Зорев <[email protected] 
> > <mailto:[email protected]>> a écrit :
> > 
> > 
> > Hello,
> > 
> > I'm trying to figure out (out of interest) how Karaf responds to a ctrl+D 
> > keypress on the console. So far I found that there is some jline reader 
> > which, in case of ctrl+D input throws an 
> > org.jline.reader.EndOfFileException . Then the karaf console responds to 
> > this (in the case of a "local" console, that's another question at all but 
> > lets ignore it for now) by stopping the framework.
> > 
> > Could you elaborate a bit what this jline reader is, what are its key 
> > bindings and how this is integrated in karaf. Or please point me at some 
> > source/documentation, then I could investigate further :)
> > 
> > Thank you,
> > Regards,
> > Vassil
> 

Reply via email to