elasticsearch/elasticsearch — pull request #8993 by tlrx (2014-12-17 17:18:23+00:00)
Title: Shutdown: Add support for Ctrl-Close event on Windows platforms to grace...

...fully shutdown node

This commit adds the support for the Ctrl-Close event on Windows using native system calls. This way, it is possible to catch the Ctrl-Close event sent by a 'taskill /pid' command (or when the user closes the console window where elasticsearch.bat was started) and gracefully close the node. Before this commit, the node was simply killed on taskkill/window closing.