code: def _check_alive(self) -> Generator[Any, None, None]:
          
          if self.loop is None:
              return
          pid = os.getpid()
          try:
              while self.alive:  # type: ignore
                  self.notify()
  
                  if pid == os.getpid() and self.ppid != os.getppid():
                      self.alive = False
                      self.log.info("Parent changed, shutting down: %s", self)
                  else:
                      yield from asyncio.sleep(1.0, loop=self.loop)
          except (Exception, BaseException, GeneratorExit, KeyboardInterrupt):
              pass
          yield from self.close()
docs: 等待结束信号