code: def _eintr_retry(func, *args):
      
      while True:
          try:
              return func(*args)
          except (OSError, select.error) as e:
              if e.args[0] != errno.EINTR:
                  raise
docs: restart a system call interrupted by EINTR