Hi,
I'm developing a Node script that kills an Elasticsearch instance.
The script is very simple (see Gist).
It just read a es.pid file, created by the Elasticsearch itself (when running witth elasticsearch/bin/elasticsearch.bat -p ../../es.pid) and sends a signal to that process.
When entering a Ctrl+C directly in keyboard, Elasticsearch perform a "clean" close.
But when I run my script, Elasticsearch is behaving as it received a -9 signal. It just closes without a proper shutdown.
As I've never programmed in Node before, i don't know whether it is a Node issue, an Elasticsearch issue, my script issue or all of them.
I've just tested in Windows 10, latest v6 Node, Elasticsearch 5.1.1.
I would appreciate some help.