protected EmuUnixFileDescriptor<T> findFd(int fd) {
		synchronized (descriptors) {
			EmuUnixFileDescriptor<T> desc = descriptors.get(fd);
			if (desc == null) {
				throw new EmuUnixException("Invalid descriptor: " + fd, getErrno(Errno.EBADF));
			}
			return desc;
		}
	}
Get the file descriptor object for the given file descriptor number

@param fd the descriptor number
@return the descriptor object
@throws EmuUnixException with {@link Errno#EBADF} if the file descriptor is invalid
Ghidra/Features/SystemEmulation/src/main/java/ghidra/pcode/emu/unix/AbstractEmuUnixSyscallUseropLibrary.java