Commit 3b774da4 authored by Miguel@light.local's avatar Miguel@light.local
Browse files

Changes on NT service for a more faster stop of the service on Win2k

and free the main thread of the service.
parent df1045ee
Loading
Loading
Loading
Loading
+1 −21
Original line number Diff line number Diff line
davida@isil.mysql.com
heikki@donna.mysql.fi
jani@hynda.mysql.fi
jani@janikt.pp.saunalahti.fi
jcole@tetra.spaceapes.com
miguel@light.local
monty@bitch.mysql.fi
monty@hundin.mysql.fi
monty@tik.mysql.fi
monty@work.mysql.com
mwagner@evoq.mwagner.org
paul@central.snake.net
paul@teton.kitebird.com
sasha@mysql.sashanet.com
serg@serg.mysql.com
tim@bitch.mysql.fi
tim@threads.polyesthetic.msg
tim@white.box
tim@work.mysql.com
tonu@x153.internalnet
tfr@sarvik.tfr.cafe.ee
Miguel@light.local
+1 −1
Original line number Diff line number Diff line
@@ -2006,7 +2006,7 @@ The server will not act as a slave.");
  {
    if(start_mode)
    {
      if (WaitForSingleObject(hEventShutdown,INFINITE)==WAIT_OBJECT_0)
      if (WaitForSingleObject(hEventShutdown,1000)==WAIT_TIMEOUT)
        Service.Stop();
    }
    else
+2 −1
Original line number Diff line number Diff line
@@ -246,7 +246,8 @@ void NTService::ServiceMain(DWORD argc, LPTSTR *argv)
  WaitForSingleObject (pService->hExitEvent, INFINITE);

  // wait for thread to exit
  WaitForSingleObject (pService->hThreadHandle, 30000);
  if (WaitForSingleObject (pService->hThreadHandle, 1000)==WAIT_TIMEOUT)
   CloseHandle(pService->hThreadHandle);

  pService->Exit(0);
}