From a64a25baf9dd9ecff571bbab7a0dcb860eb06d24 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 13 Dec 2011 17:44:19 +0200 Subject: Bug#11754011: 45546: START WINDOWS SERVICE, THEN EXECUTE WHAT IS NEEDED. Added a global read-only option slow-start-timeout to control the Windows service control manager's service start timeout, that was currently hard-coded to be 15 seconds. The default of the new option is 15 seconds. The timeout can also be set to 0 (to mean no timeout applicable). --- sql/nt_servc.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sql/nt_servc.cc') diff --git a/sql/nt_servc.cc b/sql/nt_servc.cc index 1f1b7f0c20f..d6a8eac7ed5 100644 --- a/sql/nt_servc.cc +++ b/sql/nt_servc.cc @@ -276,7 +276,13 @@ error: void NTService::SetRunning() { if (pService) - pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0); + pService->SetStatus(SERVICE_RUNNING, NO_ERROR, 0, 0, 0); +} + +void NTService::SetSlowStarting(unsigned long timeout) +{ + if (pService) + pService->SetStatus(SERVICE_START_PENDING,NO_ERROR, 0, 0, timeout); } -- cgit v1.2.1