From: Christopher Croughton Subject: Re: Multitasking in DJGP To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) Date: Mon, 14 Apr 1997 12:33:25 +0100 Cc: crough45 AT amc DOT de, djgpp AT delorie DOT com In-Reply-To: from "Eli Zaretskii" at Apr 14, 97 11:43:22 am Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1203 Message-Id: <97Apr14.133053gmt+0100.21890@internet01.amc.de> Eli Zaretskii wrote: > I know what `fork' does on Unix. What I don't understand is what is so > important about the precise way `fork' works that you need to duplicate > it in DJGPP. If you are willing to wait until the child exits, why can't > you just spawn the same program, like so: Try doing it when the bit that does the fork is down in 10 levels of function calls, and depends on gobal variables being set correctly by the time it gets there. In the case of tcsh, that includes all the aliases and local shell variables, not just the environment which is passed to the child. Yes, with a trivial program the change is equally trivial, but it's like the cases which use setjmp and longjmp. > No, they are still called `child processes' on Unix, so this is not the > source of the misunderstanding. I just don't understand what is it that > you value so much in the peculiar way `fork' works on Unix. But in DOS although they are called the same they don't act the same. Like a lot of things in DOS... If the code had been written for DOS then I wouldn't need fork (although it is still useful). Or I could rewrite the whole thing, but then it's not a port it's a rewrite... Chris