X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: 20 May 2004 08:21:31 +0200 Message-Id: From: Eli Zaretskii To: djgpp AT delorie DOT com In-reply-to: <4d201f78.0405191847.6697f90d@posting.google.com> (048321887-0001 AT t-online DOT de) Subject: Re: Using DR-DOS fork in DJGPP References: <4d201f78 DOT 0405181653 DOT 16a677b6 AT posting DOT google DOT com> <4d201f78 DOT 0405191158 DOT 63550b51 AT posting DOT google DOT com> <7704-Wed19May2004233123+0300-eliz AT gnu DOT org> <4d201f78 DOT 0405191847 DOT 6697f90d AT posting DOT google DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: 048321887-0001 AT t-online DOT de (Udo Kuhnt) > Newsgroups: comp.os.msdos.djgpp > Date: 19 May 2004 19:47:50 -0700 > > Well, I am curious - I heard that the DJGPP C library has been developed from > one for FreeBSD, or something like that, which probably has a working fork > sys call. Is this code still present in DJGPP and could it be reactivated, or > has it been removed because it did not seem useful? The first version of the library was a hacked libc from ISC Unix, followed by a ported BSD library (for more about that, see http://www.delorie.com/djgpp/history.html). However, the library was rewritten from scratch during development of DJGPP v2.0, so all traces of Unix are mostly gone now. In any case, there would be no sense in keeping any code from the Unix `fork', as `fork' is a system call on Unix systems, implemented entirely in the kernel, and so not really visible in the library sources. By contrast, a DJGPP implementation would need to be part of the library. I've read the description of the Caldera multitasking API, but there's one thing I'm not sure I understood: when an application calls the X_PCreate function to create a new process, what program is executing in that process? Is that the same program as the one which called X_PCreate, and if so, is its memory really a copy of the calling process's memory, as it should be under `fork' semantics? Also, does the child process inherit the file handles from the parent?