search for: service_ctrl

Displaying 7 results from an estimated 7 matches for "service_ctrl".

2006 Jun 19
9
win32-service patch
Attached is a patch and my service.c if there is any difficulty applying the patch. I did the following: 1. Created a ruby thread (Ruby_Service_Ctrl), that polls against a simple integer value (protected by a critical section). I was worried this would be "expensive"; however, I found the rb_thread_polling method and it seems to work well. 2. When an event occurs in Service_Ctrl it sets the flag value. 3. If Ruby_Service_Ctrl finds...
2006 Jun 18
7
[Fwd: Ruby Win32-Service]
Thoughts? Dan -------------- next part -------------- An embedded message was scrubbed... From: "Patrick Hurley" <phurley at gmail.com> Subject: Ruby Win32-Service Date: Sun, 18 Jun 2006 12:46:01 -0400 Size: 2863 Url: http://rubyforge.org/pipermail/win32utils-devel/attachments/20060618/cc346796/attachment.eml
2006 Jun 18
1
Win32-Service and threading
...readID and in logging I displayed the Current TID -- and we are switching system threads in the ruby interpreter. Looking at service.c, I see you are using RegisterServiceCtrlHandler, there is no guarantee that it will be called from the main thread (matter of fact it generally won''t). In Service_Ctrl, you make an rb_funcall using the call back hash, which then calls back into the interpreter while the main thread is still running under mainloop. My side effect was some scrambled ruby file handles and some pipe closed on stopping errors. I would be happy to give back and fix this issue, but wan...
2006 Dec 07
0
Fwd: win32-service problems with patch
...int cList; -static int cSize; - CRITICAL_SECTION csControlCode; // I happen to know from looking in the header file // that 0 is not a valid service control code @@ -39,7 +34,6 @@ static VALUE service_close(VALUE); void WINAPI Service_Main(DWORD dwArgc, LPTSTR *lpszArgv); void WINAPI Service_Ctrl(DWORD dwCtrlCode); -void ErrorStopService(); void SetTheServiceStatus(DWORD dwCurrentState,DWORD dwWin32ExitCode, DWORD dwCheckPoint, DWORD dwWaitHint); @@ -57,27 +51,27 @@ (LPHANDLER_FUNCTION)Service_Ctrl); if(ssh == (SERVICE_STATUS_HANDLE)0){ -...
2004 Feb 05
1
Service event hooks question
In order to be able to call event hooks as I mentioned previously it looks like I''ll have to do something like this in Service_Ctrl(): // For example if(dwCtrlCode == SERVICE_CONTROL_STOP){ rb_funcall(self,rb_intern("send"),rb_intern("on_stop")); } There are a few problems. First, I''m not sure I''m calling that properly. Second, I don''t know how to get "self" into t...
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
2006 May 22
9
win32/service... still with problems.
Hello list, In my quest to get Mongrel working as service for win32, found some problems with win32/service that make it impossible to solve. Attached is the simplest service script I could do with ruby, which depends on win32/service. I found that doing anything complex in service_stop (killing threads, doing file handling, even sleeping for 0.25 seconds). crash the service with backtraces (of