/* Called just before an execve cleanup stuff temporary files */ void cleanup_proc_env(void) { struct env *ep; for (ep = e; ep; ep = ep->oenv) remove_temps(ep->temps); }
/* remove temp files and free ATEMP Area */ static void reclaim(void) { struct block *l; while ((l = e->loc) && (!e->oenv || e->oenv->loc != l)) { e->loc = l->next; afreeall(&l->area); } remove_temps(e->temps); e->temps = NULL; afreeall(&e->area); }
/* remove temp files and free ATEMP Area */ static void reclaim(void) { struct block *l; while ((l = e->loc) && (!e->oenv || e->oenv->loc != l)) { e->loc = l->next; afreeall(&l->area); } remove_temps(e->temps); e->temps = NULL; /* * if the memory backing source is reclaimed, things * will end up badly when a function expecting it to * be valid is run; a NULL pointer is easily debugged */ if (source && source->areap == &e->area) source = NULL; afreeall(&e->area); }