exec (2) --- execute pathname 02/24/82 _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n subroutine exec (path_name) character path_name (ARB) Library: vswtlb (standard Subsystem library) _F_u_n_c_t_i_o_n 'Exec' is a means of chaining execution to another program. The argument is a pathname specifying the Primos run file of the program to be executed. 'Exec' returns if an error was encountered, otherwise control is passed to the called program and no return is possible. _I_m_p_l_e_m_e_n_t_a_t_i_o_n 'Exec' calls the Subsystem routine 'getto' to get to the UFD in which the file to be executed exists. The existence of the file is checked with the function 'findf$'; if the file exists, it is executed via a call to the Primos routine RESU$$. If the file is not found, or could not be reached by 'getto', 'exec' returns to the calling program. Note that since a call to RESU$$ is used, 'exec' can be used to execute P300 run-file format programs only. _C_a_l_l_s getto, findf$, Primos resu$$ _B_u_g_s Since Primos provides no way to tell if a file is executable object code, there is always a strong possibility that resuming a file of unknown type will cause an unrecoverable error. _S_e_e _A_l_s_o execn (2), getto (2), findf$ (2) exec (2) - 1 - exec (2)