# File common/lib/symbiosis/utils.rb, line 469
    def unlock(fh)
      raise ArgumentError, "Expected a file handle not a #{fh.class}" unless fh.is_a?(File)
      raise ArgumentError, "File handle #{fh} is closed" if fh.closed?

#      flock_struct = [Fcntl::F_UNLCK, IO::SEEK_SET, 0, 0, 0])
#      fh.fcntl(Fcntl::F_SETLK, flock_struct.pack("s2L2i*"))

      if fh.flock(File::LOCK_UN | File::LOCK_NB)
        return 0
      else
        raise Errno::EAGAIN
      end

    rescue SystemCallError => err
      raise Errno::ENOLCK, "Unable to release lock -- #{err.to_s}"
    end