def wait_on_children(self):
        while self.running:
            try:
                pid, status = os.wait()
                if os.WIFEXITED(status) or os.WIFSIGNALED(status):
                    self.logger.error(_('Removing dead child %s') % pid)
                    self.children.remove(pid)
                    self.run_child()
            except __HOLE__, err:
                if err.errno not in (errno.EINTR, errno.ECHILD):
                    raise
            except KeyboardInterrupt:
                sys.exit(1)
                self.logger.info(_('Caught keyboard interrupt. Exiting.'))
                break
        eventlet.greenio.shutdown_safe(self.sock)
        self.sock.close()
        self.logger.debug(_('Exited'))
dataset/ETHPy150Open rcbops/glance-buildpackage/glance/common/wsgi.py/Server.wait_on_children