A bug in kindlegen causes it randonly to hang when converting epub to mobi. This happens above 90% of the time it is called so this change foce it to be killed as soon kcc detects it's donne the job.
For this to work shell arg must be false. Otherwise terminate() will try to kill the new opened cmd/terminal instead of kindlegen.