[ 
https://issues.apache.org/jira/browse/IOTDB-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17412499#comment-17412499
 ] 

Zhong Wang commented on IOTDB-1664:
-----------------------------------

It is possible, please see: 
[http://www.docjar.com/docs/api/sun/misc/Signal.html]

 

This solution is used by Jline, which is a wildly used platform-independent 
terminal framework. 

 

Here is the source code of Jline that handles signals: 
https://github.com/jline/jline3/blob/master/terminal/src/main/java/org/jline/utils/Signals.java

> CLI quits with ctrl-D instead of ctrl-C
> ---------------------------------------
>
>                 Key: IOTDB-1664
>                 URL: https://issues.apache.org/jira/browse/IOTDB-1664
>             Project: Apache IoTDB
>          Issue Type: Improvement
>          Components: Client/CLI
>            Reporter: Zhong Wang
>            Priority: Major
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Users of shell or command line tools like IPython tend to use ctrl-C to clear 
> the current input buffer and use ctrl-D to exit the shell.
>  
> It is easy to achieve, but can greatly improve the user experience. People 
> won't frequently exit the CLI by accident anymore.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to