How to shut down filebeat properly

Hello,
We run filebeat from the command line. I am wondering is there a way to shutdown filebeat properly other than "kill -9", so that filebeat has chance to save its state before exit?

thanks.
yan

SIGTERM should be enough normally, so kill without -9. It might take a few seconds, but it should shutdown properly, we'd consider it a bug if it doesn't.

kill -9 can result in duplicates, but shouldn't lose log lines.