[pywin32-bugs] [ pywin32-Feature Requests-3588884 ] Add support for service recovery
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2012-11-21 09:34:27
|
Feature Requests item #3588884, was opened at 2012-11-21 01:34 Message generated for change (Tracker Item Submitted) made by dgovaerts You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551957&aid=3588884&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Dieter G (dgovaerts) Assigned to: Nobody/Anonymous (nobody) Summary: Add support for service recovery Initial Comment: Currently there seems to be no way to use the automatic service recovery options provided by the service manager in case of a failure in the service. According to http://msdn.microsoft.com/en-us/library/ms685939%28VS.85%29.aspx , a service is considered failed if it didn't report a status of SERVICE_STOPPED before terminating. When using the win32serviceutil.ServiceFramework the SERVICE_STOPPED status is always reported to the service manager (at the end of the service_main() function in PythonService.cpp) and there is no way to prevent this. One way to support this is by checking for a SystemExit exception with a code != 0 when returning from the "SvcRun" method in the service_main() function and not report the SERVICE_STOPPED status in that case. One can thus trigger the recovery by calling "exit(1)". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551957&aid=3588884&group_id=78018 |