Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!spool.mu.edu!uunet!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.programmer Subject: Re: A Question and a Thought (RemTask() and File servers) Message-ID: <18492@cbmvax.commodore.com> Date: 2 Feb 91 06:50:15 GMT References: <28304.27a99513@kuhub.cc.ukans.edu> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 18 In article <28304.27a99513@kuhub.cc.ukans.edu> markv@kuhub.cc.ukans.edu writes: >Is it safe for a task to RemTask() itself? I have a parent that will >spawn n (no limit beyond available mem) children tasks that can exit >asynchronously to the parent. Assuming post task cleanup (like >memory for the Task structure) will be done by mommy :-), can the >children Terminate themselves, or does Mommy have to do it for them? >If not, what about a real "Process" w/an empty seglist calling Exit()? RemTask(0) - seppuku. Make sure the parent can't try to unload/free it before RemTask is called. Common method: Forbid(), Replymsg(to parent), RemTask(0). When the task goes away, it automatically breaks the forbid. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup The compiler runs Like a swift-flowing river I wait in silence. (From "The Zen of Programming") ;-)