Re: How to handle Ctrl+C and other Sigint

2017-03-02 Thread Guillaume Nodet
SSHd won't do anything about it, it simply focuses on transporting the data and conveying all the needed informations. It's the responsibility of the shell to implement things correctly, so the only thing I can do (and did already) is to point you to a java shell which is doing this. If you write

Re: How to handle Ctrl+C and other Sigint

2017-03-02 Thread waseem.farooqui
Yes I research on reading from the input stream IN case of Ctrl+c terminal sends 3 as a byte data and same in case of others. But should I handle all the special inputs myself or is there any class ? I have search a lot for its example but not find any. -- View this message in context:

Re: How to handle Ctrl+C and other Sigint

2017-03-02 Thread elijah baley
The answer is very long and complex however here are a few pointers - See Signal(s) and how to register for them - Do some research into reading from the peer input stream and detecting key combinations and/or special characters. From: waseem.farooqui

Re: How to handle Ctrl+C and other Sigint

2017-03-02 Thread Guillaume Nodet
You need to configure the terminal correctly on the client and server side, you also need to process the signals correctly. For example, Ctrl+C is just the character 0x03 in the input stream. Wether you should terminate or not is your decision. Del, backspace and tab are also characters in the