Ejemplo n.º 1
0
 def init_poller(self):
     if sys.platform == 'win32':
         if self.interrupt or self.parent_handle:
             self.poller = ParentPollerWindows(self.interrupt,
                                               self.parent_handle)
     elif self.parent_handle:
         self.poller = ParentPollerUnix()
Ejemplo n.º 2
0
 def init_poller(self):
     if sys.platform == 'win32':
         if self.interrupt or self.parent_handle:
             self.poller = ParentPollerWindows(self.interrupt,
                                               self.parent_handle)
     elif self.parent_handle and self.parent_handle != 1:
         # PID 1 (init) is special and will never go away,
         # only be reassigned.
         # Parent polling doesn't work if ppid == 1 to start with.
         self.poller = ParentPollerUnix()