X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=service.cpp;h=5c6adaff1603d800e233dc0a52557c2801333782;hb=99c5c2868f1d351d4d0569fda9199dda1aadad07;hp=028b035c71281cededbc12b7cca52e18701f31ff;hpb=f3d91adc48a7618fd9c94cbc45143f89b47b59e4;p=nssm.git diff --git a/service.cpp b/service.cpp index 028b035..5c6adaf 100644 --- a/service.cpp +++ b/service.cpp @@ -459,7 +459,7 @@ int stop_service(unsigned long exitcode, bool graceful, bool default_action) { if (pid) { /* Shut down service */ log_event(EVENTLOG_INFORMATION_TYPE, NSSM_EVENT_TERMINATEPROCESS, service_name, exe, 0); - kill_process(service_name, stop_method, process_handle, pid, 0); + kill_process(service_name, service_handle, &service_status, stop_method, process_handle, pid, 0); } else log_event(EVENTLOG_INFORMATION_TYPE, NSSM_EVENT_PROCESS_ALREADY_STOPPED, service_name, exe, 0); @@ -509,7 +509,7 @@ void CALLBACK end_service(void *arg, unsigned char why) { /* Clean up. */ if (exitcode == STILL_ACTIVE) exitcode = 0; - kill_process_tree(service_name, stop_method, pid, exitcode, pid, &creation_time, &exit_time); + kill_process_tree(service_name, service_handle, &service_status, stop_method, pid, exitcode, pid, &creation_time, &exit_time); /* The why argument is true if our wait timed out or false otherwise.