+ def handle_timer(self):
+ log.debug(u'PppHandler.handle_timer()')
+ for c in self.conns.values():
+ log.debug(u'PppHandler.handle_timer: processing connection %r', c)
+ p = subprocess.Popen(('pgrep', '-f', 'pppd call ' + c.name),
+ stdout=subprocess.PIPE)
+ pid = p.communicate()[0]
+ if p.returncode == 0 and len(pid) > 0:
+ log.debug(u'PppHandler.handle_timer: pid present, running')
+ c._running = True
+ else:
+ log.debug(u'PppHandler.handle_timer: pid absent, NOT running')
+ c._running = False
+