We were calling TerminateProcess() on the service process handle in
instead of the handle passed to kill_process().
Thanks Sam Townsend.
/* We tried being nice. Time for extreme prejudice. */
if (service->stop_method & NSSM_STOP_METHOD_TERMINATE) {
/* We tried being nice. Time for extreme prejudice. */
if (service->stop_method & NSSM_STOP_METHOD_TERMINATE) {
- return TerminateProcess(service->process_handle, exitcode);
+ return TerminateProcess(process_handle, exitcode);