[
https://issues.apache.org/jira/browse/IOTDB-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17412969#comment-17412969
]
Zhong Wang commented on IOTDB-1664:
-----------------------------------
For POSIX systems, Jline provides a signal handling interface from Jline3. So
we may have to the sun.misc.SignalHandler directly to register signal handlers.
For non-POSIX systems like windows, I googled a little bit and found an
official document of handling windows:
https://docs.oracle.com/javase/10/troubleshoot/handle-signals-and-exceptions.htm#JSTGD348
And here is an example of exiting gracefully in windows:
https://www.javarticles.com/2018/01/jna-console-close-listener.html
> 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
> Labels: easy-fix
> 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)