search for: hstopev

Displaying 4 results from an estimated 4 matches for "hstopev".

Did you mean: hstop
2006 Dec 07
0
Fwd: win32-service problems with patch
...rescue clauses to catch all exceptions AND NOT EXIT so that the SCM could still send the stop message, so that the threads would be cleaned up and etc. * ErrorStopService removed because it was abused - called when it didn''t make sense. Instead, I explicitly put in error handling and set hStopEvent or set service status appropriately. Probably could still be better. * Waiting for hThread to exit AFTER closing hStopEvent (which might be waiting on hStopEvent) * the state SHOULD == RUNNING when service_main starts (I had a problem where it was 0). * EventHookHash was a global variable th...
2005 Nov 26
1
Another patch of win32-service for nice startup.
...================================================== --- temp/service.c 2005-11-27 00:03:30.000000000 +0900 +++ service.c 2005-11-27 00:01:58.000000000 +0900 @@ -14,6 +14,7 @@ static VALUE cDaemonError; static VALUE rbServiceStruct, rbServiceStatusStruct; +static HANDLE hStartEvent; static HANDLE hStopEvent; static SERVICE_STATUS_HANDLE ssh; static DWORD dwServiceState; @@ -33,6 +34,7 @@ { DWORD bRet; DWORD dwWaitRes; + int i; // Obtain the name of the service. LPTSTR lpszServiceName = lpszArgv[0]; @@ -46,6 +48,15 @@ rb_raise(cDaemonError,"RegisterServiceCtrlHa...
2007 Dec 27
0
[ win32utils-Patches-16627 ] Replace inefficient busy wait loop with UDP/IP loopback socket.
...Group: Code Cleanup Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Replace inefficient busy wait loop with UDP/IP loopback socket. Initial Comment: Here are some patches for win32-service which eliminate the messy busy loop that polls the hStopEvent with a zero timeout. Instead of using a Windows event, these patches create a UDP/IP socket bound to the loopback interface which can be used in ruby''s green threads event loop. I believe this is a much cleaner and more efficient mechanism than the WIndows event flag since it allows...
2005 Sep 08
11
Stopping services
I''m back to getting stuff to run as a Windows service, and am running in to a problem. My service (a Daemon ruby class) installs and starts fine, but when I try to stop it, I get: C:\workspaces\default\tahoe>ruby script\service stop script/service:77:in `stop'': An exception occurred in the service when handling the control request. (Win32::ServiceError) from