search for: service_stop_pending

Displaying 5 results from an estimated 5 matches for "service_stop_pending".

2006 May 21
0
Mongrel as win32-service, round3.
...annot do file operations (like openning a file and logging into it) inside service_stop, or actually stopping the listeners threads user by mongrel make the service hang and report an error. Found that the rb_funcall() to service_stop (if defined) is done previously to setting the service state to SERVICE_STOP_PENDING, a thing that sometimes make the service manager think the service just crashed. So far, tested in Windows XP SP2 without any kind of problems (runned 50 start/serve/stop cycles). Any feedback on this will be helpful, so I attached a Rakefile that should be used to perform the same test cycles I...
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
2013 Aug 21
2
[PATCH 1/3] Rationalise whitespace to 4 space indentation with no trailing spaces
...eStatus ( + 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_CONTROL_INTERROGATE: /* Fall through to send current status. */ - break; - - de...
2006 Dec 07
0
Fwd: win32-service problems with patch
...{ + char buf[80]; + sprintf(buf, "num_threads = %u\n", RARRAY(list)->len); + } + + if (RARRAY(list)->len <= 1) + break; + + // This is another ugly polling loop, be as polite as possible + rb_thread_polling(); + + SetTheServiceStatus(SERVICE_STOP_PENDING, 0, i, 1000); + } + + // just one ruby thread + SetEvent(hStopCompletedEvent); + + // wait for the thread to stop BEFORE we close the hStopEvent + // handle + WaitForSingleObject(hThread, INFINITE); + + // Close the event handle (who cares if it succeeds, and + // we may be cle...
2013 Aug 29
5
[PATCH 1/6] Rationalise whitespace to 4 space indentation with no trailing spaces
...eStatus ( + 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_CONTROL_INTERROGATE: /* Fall through to send current status. */ - break; - - de...