code: def close_fds(self, skip_close_fds):  # pragma: no cover, not with unit tests...
          
          # First we manage the file descriptor, because debug file can be
          # relative to pwd
          max_fds = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
          if max_fds == resource.RLIM_INFINITY:
              max_fds = 1024
          self.pre_log.append(("DEBUG", "Maximum file descriptors: %d" % max_fds))
  
          # Iterate through and close all file descriptors.
          for file_d in range(0, max_fds):
              if file_d in skip_close_fds:
                  self.pre_log.append(("INFO", "Do not close fd: %s" % file_d))
                  continue
              try:
                  os.close(file_d)
              except OSError:  # ERROR, fd wasn't open to begin with (ignored)
                  pass
docs: Close all the process file descriptors.
          Skip the descriptors present in the skip_close_fds list
  
          :param skip_close_fds: list of file descriptor to preserve from closing
          :type skip_close_fds: list
          :return: None