static void ixterm( PD *r ) { register WORD h; register WORD i; /* check the standard devices in both file tables */ for( i = 0 ; i < NUMSTD ; i++ ) if( (h = r->p_uft[i]) > 0 ) xclose(h); for (i = 0; i < OPNFILES; i++) if (r == sft[i].f_own) xclose(i+NUMSTD); /* check directory usage M01.01.07 */ for( i = 0 ; i < NUMCURDIR ; i++ ) { if( (h = r->p_curdir[i]) != 0 ) diruse[h]-- ; } /* free each item in the allocated list, that is owned by 'r' */ free_all_owned(r, &pmd); #if CONF_WITH_ALT_RAM if(has_alt_ram) free_all_owned(r, &pmdalt); #endif }
/* * ixterm - terminate a process * * terminate process with PD 'r'. * * @r: PD of process to terminate */ static void ixterm(PD *r) { WORD h; WORD i; /* call process termination vector (last chance for user cleanup) */ etv_term(); /* check the standard devices in both file tables */ for (i = 0; i < NUMSTD; i++) if ((h = r->p_uft[i]) > 0) xclose(h); for (i = 0; i < OPNFILES; i++) if (r == sft[i].f_own) xclose(i+NUMSTD); /* decrement usage counts for current directories */ for (i = 0; i < NUMCURDIR; i++) { if ((h = r->p_curdir[i]) != 0) decr_curdir_usage(h); } /* free each item in the allocated list that is owned by 'r' */ free_all_owned(r, &pmd); #if CONF_WITH_ALT_RAM if(has_alt_ram) free_all_owned(r, &pmdalt); #endif }