当前位置: 首页>>代码示例>>Python>>正文


Python win32service.SERVICE_STOP_PENDING属性代码示例

本文整理汇总了Python中win32service.SERVICE_STOP_PENDING属性的典型用法代码示例。如果您正苦于以下问题:Python win32service.SERVICE_STOP_PENDING属性的具体用法?Python win32service.SERVICE_STOP_PENDING怎么用?Python win32service.SERVICE_STOP_PENDING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在win32service的用法示例。


在下文中一共展示了win32service.SERVICE_STOP_PENDING属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        from cherrypy import process
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        process.bus.exit() 
开发者ID:cherrypy,项目名称:cherrypy,代码行数:6,代码来源:win32.py

示例2: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        win32event.SetEvent(self.hWaitStop)
        self.isAlive = False 
开发者ID:AutohomeRadar,项目名称:Windows-Agent,代码行数:6,代码来源:agent.py

示例3: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        SetEvent(self.hWaitStop) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:5,代码来源:pipeTestService.py

示例4: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        win32event.SetEvent(self.hWaitStop) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:5,代码来源:serviceEvents.py

示例5: SvcRun

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcRun(self):
        self.ReportServiceStatus(win32service.SERVICE_RUNNING)
        self.SvcDoRun()
        # Once SvcDoRun terminates, the service has stopped.
        # We tell the SCM the service is still stopping - the C framework
        # will automatically tell the SCM it has stopped when this returns.
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:9,代码来源:win32serviceutil.py

示例6: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        '''
        Called when the service is asked to stop
        '''
        self.stop()
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        win32event.SetEvent(self.hWaitStop) 
开发者ID:frappe,项目名称:biometric-attendance-sync-tool,代码行数:9,代码来源:SMWinservice.py

示例7: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
		self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
		cherrypy.engine.exit()
		
		self.ReportServiceStatus(win32service.SERVICE_STOPPED) 
		# very important for use with py2exe
		# otherwise the Service Controller never knows that it is stopped ! 
开发者ID:pawl,项目名称:Chinese-RFID-Access-Control-Library,代码行数:9,代码来源:windows_webservice.py

示例8: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        win32event.SetEvent(self.hWaitStop)
        self._running = False 
开发者ID:architecture-building-systems,项目名称:CityEnergyAnalyst,代码行数:6,代码来源:ceajenkins.py

示例9: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        self.log("Stopping scalyr service")
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        win32event.SetEvent(self._stop_event)
        self.controller.invoke_termination_handler()
        self.ReportServiceStatus(win32service.SERVICE_STOPPED) 
开发者ID:scalyr,项目名称:scalyr-agent-2,代码行数:8,代码来源:platform_windows.py

示例10: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        import servicemanager
        msg = "stopping."
        try:
            # There's no way to say this nicely
            self.process_handle.terminate()
        except Exception as exc:
            msg = exc.message
            pass
        servicemanager.LogInfoMsg(self._svc_name_ + " - Received stop signal; " + msg)
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        self.isAlive = False 
开发者ID:ibmresilient,项目名称:resilient-python-api,代码行数:14,代码来源:service_wrapper.py

示例11: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        import servicemanager
        # tell windows SCM we're shutting down
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        servicemanager.LogInfoMsg("OpsBro Start")
        # launch the stop event
        win32event.SetEvent(self.hWaitStop) 
开发者ID:naparuba,项目名称:opsbro,代码行数:9,代码来源:windows_service.py

示例12: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
            self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
            win32event.SetEvent(self.hWaitStop) 
开发者ID:target,项目名称:grease,代码行数:5,代码来源:DaemonCmd.py

示例13: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        self.ReportServiceStatus(svc.SERVICE_STOP_PENDING)
        self.stop()
        self.ReportServiceStatus(svc.SERVICE_STOPPED) 
开发者ID:grawity,项目名称:code,代码行数:6,代码来源:powermonitor.py

示例14: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        self.stop()
        self.ReportServiceStatus(win32service.SERVICE_STOPPED) 
开发者ID:PacktPublishing,项目名称:Python-for-Offensive-PenTest,代码行数:6,代码来源:Create a New Admin account.py

示例15: SvcStop

# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) #tell the Service Manager that we are planing to stop the serivce
        self.stop()
        self.ReportServiceStatus(win32service.SERVICE_STOPPED) #tell the Service Manager that we are currently stopping the service 
开发者ID:PacktPublishing,项目名称:Python-for-Offensive-PenTest,代码行数:6,代码来源:Backdoor-ing Legitmate Windows Service.py


注:本文中的win32service.SERVICE_STOP_PENDING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。