Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ginosko!usc!rutgers!att!cbnewsc!gregg From: gregg@cbnewsc.ATT.COM (gregg.g.wonderly) Newsgroups: comp.sys.amiga.tech Subject: Re: Suggestions for a kill command Message-ID: <3946@cbnewsc.ATT.COM> Date: 18 Oct 89 01:56:38 GMT References: <7238@sdcsvax.UCSD.Edu> Organization: AT&T Bell Laboratories Lines: 28 The really silly thing is that the O/S already knows that we have a resource, that is its job, why can't a sys_exit() routine be supplied with DOS that does all of the cleanup? The UN*X notion of everything being a file that the process must open or close certainly make life simpler. Why can't each resource in amiga-dos have a resource address that is put into an array of per process resource pointers at the time that it is allocated? An O/S routine call of the form add_resource(TaskPtr, ResourcePtr) would add a resource to the list of the PROCESS indicated by the TaskPtr. When a process exits (tasks calling sys_exit() cause a cooresponding per-process task counter to be decremented, when it is zero, process exit work is done), all associated cleanup could be done by having the O/S do somthing like the following for (i=0; i < TaskPtr->resource_cnt; ++i) (*TaskPtr->res_list[i]->freeproc)(TaskPtr, TaskPtr->res_list[i]) Presto, everything always gets cleaned up! What's the problem with with something like this? Seems rather silly for us to be banging our heads against the wall and rebooting all the time when this kind of stuff is what O/S's are supposed to do for us! Gregg Wonderly -- ----- gregg.g.wonderly@att.com (AT&T bell laboratories)