def shutdown(self, details=None):
# terminate all processes started by the broker
if self.hsl:
self.hsl.terminate()
if self.brl:
self.brl.terminate()
if self.wlan_lister:
self.wlan_lister.terminate()
if self.pm_lister:
self.pm_lister.terminate()
self.stop_sharing()
for session in self.sessions.values():
try:
# send SIGTERM, not SIGKILL, so that Session.shutdown() runs
session[LOCAL].terminate()
except OSError, e:
if e.errno not in [errno.ECHILD, errno.ESRCH]:
raise Exception('unhandled errno: %d' % e.errno)
Control.shutdown(self, details) # does not return. always do last
评论列表
文章目录