Commit cafcf644 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

services: Remove service_terminate function.

parent 5137bfd4
......@@ -1137,7 +1137,8 @@ DWORD __cdecl svcctl_ControlService(
if (result == ERROR_SUCCESS && service->service_entry->force_shutdown)
{
result = ERROR_SERVICE_CANNOT_ACCEPT_CTRL;
service_terminate(service->service_entry);
if ((process = service->service_entry->process))
process_terminate(process);
}
if (result != ERROR_SUCCESS)
......
......@@ -787,7 +787,7 @@ static DWORD service_start_process(struct service_entry *service_entry, struct p
if (!r)
{
err = GetLastError();
service_terminate(service_entry);
process_terminate(process);
return err;
}
......@@ -915,7 +915,7 @@ DWORD service_start(struct service_entry *service, DWORD service_argc, LPCWSTR *
if (err == ERROR_SUCCESS)
ReleaseMutex(process->control_mutex);
else
service_terminate(service);
process_terminate(process);
}
scmdatabase_unlock_startup(service->db);
......@@ -925,21 +925,6 @@ DWORD service_start(struct service_entry *service, DWORD service_argc, LPCWSTR *
return err;
}
void service_terminate(struct service_entry *service)
{
struct process_entry *process;
service_lock(service);
if ((process = service->process))
{
TerminateProcess(process->process, 0);
release_process(process);
service->process = NULL;
}
service->status.dwCurrentState = SERVICE_STOPPED;
service_unlock(service);
}
void process_terminate(struct process_entry *process)
{
struct scmdatabase *db = process->db;
......
......@@ -88,7 +88,6 @@ void release_service(struct service_entry *service);
void service_lock(struct service_entry *service);
void service_unlock(struct service_entry *service);
DWORD service_start(struct service_entry *service, DWORD service_argc, LPCWSTR *service_argv);
void service_terminate(struct service_entry *service);
/* Process functions */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment