Displaying 7 results from an estimated 7 matches for "service_control_stop".
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 the method - I
making cDaemon global and passing that but...
2006 Dec 07
0
Fwd: win32-service problems with patch
....
- VALUE val = rb_hash_aref(EventHookHash,
INT2NUM(waiting_control_code));
- if(val!=Qnil) {
- VALUE thread = rb_thread_create(Service_Event_Dispatch,
(void*) val);
- rb_funcall(thread_group, cAdd, 1, thread);
+ if (waiting_control_code != SERVICE_CONTROL_STOP) {
+ // if there is a code, create a ruby thread to deal with it
+ // this might be over engineering the solution, but I don''t
+ // want to block Service_Ctrl longer than necessary and the
+ // critical section will block it.
+...
2006 Jun 19
9
win32-service patch
...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 an entry in the call back hash it
invokes it (in its own thread) and goes back to polling
4. On a SERVICE_CONTROL_STOP the Ruby_Service_Ctrl, processes normally
and then begins to exit, but it first waits for all previously spun
threads to return.
5. Service_Ctrl on a stop waits for Ruby_Service_Ctrl to indicate that
all threads are stopped before stopping the service (it continues to
update service status politle...
2013 Aug 21
2
[PATCH 1/3] Rationalise whitespace to 4 space indentation with no trailing spaces
...heckPoint = dwCheckPoint++;
+ }
+
+ // Report the status of the service to the SCM.
+ SetServiceStatus (
+ gSvcStatusHandle,
+ &gSvcStatus
+ );
}
-VOID
-WINAPI
+VOID
+WINAPI
SvcCtrlHandler (
- DWORD dwCtrl
+ DWORD dwCtrl
) {
- switch(dwCtrl) {
- case SERVICE_CONTROL_STOP:
+ switch(dwCtrl) {
+ case SERVICE_CONTROL_STOP:
ReportSvcStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
/* Signal the service to stop. */
SetEvent(ghSvcStopEvent);
-
+
return;
-
- case SERVICE_CONTROL_INTERROGATE:
+
+ case SERVICE_...
2013 Aug 29
5
[PATCH 1/6] Rationalise whitespace to 4 space indentation with no trailing spaces
...heckPoint = dwCheckPoint++;
+ }
+
+ // Report the status of the service to the SCM.
+ SetServiceStatus (
+ gSvcStatusHandle,
+ &gSvcStatus
+ );
}
-VOID
-WINAPI
+VOID
+WINAPI
SvcCtrlHandler (
- DWORD dwCtrl
+ DWORD dwCtrl
) {
- switch(dwCtrl) {
- case SERVICE_CONTROL_STOP:
+ switch(dwCtrl) {
+ case SERVICE_CONTROL_STOP:
ReportSvcStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
/* Signal the service to stop. */
SetEvent(ghSvcStopEvent);
-
+
return;
-
- case SERVICE_CONTROL_INTERROGATE:
+
+ case SERVICE_...
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
2011 Dec 16
0
Wine release 1.3.35
...T_PENDING as valid service start status.
services: Set result inside service_send_command.
services: Fix SERVICE_STATUS initialization in svcctl_ControlService.
services: Check process status to determine if service has terminated.
services: Don't close control_pipe when SERVICE_CONTROL_STOP is sent.
services: Move service cleanup code to separate function.
services: Terminate service when its status is set to SERVICE_STOPPED.
hlink: Fix leak in HlinkNavigateToStringReference.
urlmon: Fixed trace message in URLMoniker_BindToObject function.
urlmon: Added s...