getfd$ (6) --- look for an empty file descriptor 03/25/82 _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n file_des function getfd$ (fd) file_des fd Library: vswtlb (standard Subystem library) _F_u_n_c_t_i_o_n 'Getfd$' is used by 'open' and 'mkfd$' to find an unused file descriptor with which to set up a file unit. If it could find one, it returns that file descriptor; otherwise, it returns ERR. _I_m_p_l_e_m_e_n_t_a_t_i_o_n The file descriptor list is searched to find one that is available. The search is attempted first on file descrip- tors that lie within the current page of memory. If one is not found, the search is then performed on any remaining file descriptors (possibly requiring paging to bring in the required data); if a free descriptor is found, then it is returned to the caller. If none are found this time, ERR is returned. _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d fd _S_e_e _A_l_s_o mkfd$ (6), open (2) getfd$ (6) - 1 - getfd$ (6)