Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!nike!sri-spam!sri-unix!hplabs!sdcrdcf!ucla-cs!cc1 From: cc1@locus.ucla.edu (Michael Gersten) Newsgroups: net.micro.amiga Subject: Re: An Idea for an ambitious programmer Message-ID: <1993@curly.ucla-cs.ARPA> Date: Wed, 8-Oct-86 14:46:00 EDT Article-I.D.: curly.1993 Posted: Wed Oct 8 14:46:00 1986 Date-Received: Thu, 9-Oct-86 06:31:49 EDT References: <762@oswego.UUCP> Reply-To: occ4mgk@oac.ucla.edu, cc1@LOCUS.UCLA.EDU (Michael Gersten) Distribution: net Organization: Ucla Computer Club (disclaimer) Lines: 28 Keywords: fork() Neither fork() nor exec() can be written for the amiga. Why? Fork(): What addresses are you going to fork? There is no way to find all of your memory; the best you can get is program and stack. But, all those non-relative addresses in your code will be wrong. All those pointers on the stack will point to shared data. Exec(): At some point, you have to unload yourself and load the next program. If memory is a problem, you have to unload yourself first, and the loadseg() might overwrite the exec() routine. If that isn't the problem, then you can forbid() loadseg() unloadseg() ????? At this point, you Can Not just call the other routine, as permit() will never be called. Start a new process? That has a few problems--you are no longer the same process nor the same task (message port is different), but it solves the killer permit problem. But it won't be identical to exec(), some of the process data might not get copied over correctly (not sure just what AddProc() does copy). Exec() really should be an AmigaDos call. And yes, I did suggest this to Amiga a while ago. Michael Gersten Views expressed here may not be those of the Computer Club, UCLA, or anyone in their left OR right mind. And that's the name o' that tune.