Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!cornell!batcomputer!itsgw!imagine!pawl6.pawl.rpi.edu!jesup From: jesup@pawl6.pawl.rpi.edu (Randell E. Jesup) Newsgroups: comp.sys.amiga Subject: Re: Unix on the Amiga Message-ID: <857@imagine.PAWL.RPI.EDU> Date: 6 May 88 08:40:12 GMT References: <517@viscous> <51577@sun.uucp> <1923@sugar.UUCP> Sender: news@imagine.PAWL.RPI.EDU Reply-To: jesup@pawl6.pawl.rpi.edu (Randell E. Jesup) Organization: RPI Public Access Workstation Lab - Troy, NY Lines: 37 Keywords: Unix SYSV 4.2 Amiga In article <1923@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes: >Here's one thing that will never, ever, be implemented on the Amiga... > > pid = fork(); > switch(pid) { > case -1: perror(argv[0]); exit(1); > case 0: ... > default: ... > } > >Don't tell me that AmigaDOS tasks are more efficient, or more powerful, >or less filling. I think they taste great myself. The point remains that >fork() is not compatible with them. I think they taste filling. :-) >Consider this a challenge, if you like... I don't think it's possible to >implement fork on the Amiga in the general case. >-- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter Challenge accepted. I went over all this when people wer talking about a minix port for the amiga. The way to do it is to copy the data segments and stack to save areas, then spawn another process. You'll have to modify the task variables to swap the data/stacks if needed when one of the two tasks gets CPU, plus some shenanigans for ending tasks. (By modify the task variables, I mean the code called when getting/losing CPU). I never said it would be pretty. // Randell Jesup Lunge Software Development // Dedicated Amiga Programmer 13 Frear Ave, Troy, NY 12180 \\// beowulf!lunge!jesup@steinmetz.UUCP (518) 272-2942 \/ (uunet!steinmetz!beowulf!lunge!jesup) BIX: rjesup (-: The Few, The Proud, The Architects of the RPM40 40MIPS CMOS Micro :-)