Path: utzoo!attcan!uunet!crdgw1!rpi!netserv2!deven From: deven@rpi.edu (Deven T. Corzine) Newsgroups: comp.sys.amiga.tech Subject: A REAL fork() function (was Re: SKsh weirdness) Message-ID: Date: 22 Feb 90 18:38:36 GMT References: <02152.AA02152@thekeep.UUCP> <13920046@hpfelg.HP.COM> Organization: Rensselaer Polytechnic Institute, Troy, NY Lines: 48 In-Reply-To: koren@hpfelg.HP.COM's message of 13 Feb 90 15:23:26 GMT On 13 Feb 90 15:23:26 GMT, koren@hpfelg.HP.COM (Steve Koren) said: Steve> Also, try giving it boatloads of stack. I hate this approach. Stack space can eat resources FAST. Be dynamic, dude. Put *pointers* on your stack, and AllocMem. Much nicer. Less likely to crash, too... Steve> In other words, its not my fault! really! :-) Sure, sure... :-) Steve> And while we're discussing wish lists, can I have a fork() Steve> command (the real thing, not the Lattice forkv() stuff) so I Steve> can say: Steve> if (fork() == 0) { Steve> /* here's the child process */ Steve> } else { Steve> /* here's the parent process */ Steve> } Well, I'm working on it. It's complex, but NOT impossible. I've got a solution for memory swapping (if it's not obvious, don't ask. Ugly kludge, but absolutely necessary.) but there's still some work to do. Besides, I'm working on fork() as a base for Amigix, and I have to do exec() too. Right now, high priorities are finishing the memory swapping, implementing a filesystem (at first just a front end for AmigaDOS) and proper fd semantics, pid's, finishing the memory swapping, and several other things. Then I have to write exec(), which involves (among other things) writing a loader. And possibly creating a new load file format. In any event, it won't be released soon, but anyone interested in testing (only) with NO redistribution during development, is welcome to send me mail and I'll consider it. (If I don't know you, don't count on the alpha-test list. maybe beta.) [Steve, I might put you on the alpha list if you're interested.] Deven -- Deven T. Corzine Internet: deven@rpi.edu, shadow@pawl.rpi.edu Snail: 2151 12th St. Apt. 4, Troy, NY 12180 Phone: (518) 274-0327 Bitnet: deven@rpitsmts, userfxb6@rpitsmts UUCP: uunet!rpi!deven Simple things should be simple and complex things should be possible.