delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/05/20/09:45:22

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: 048321887-0001 AT t-online DOT de (Udo Kuhnt)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Using DR-DOS fork in DJGPP
Date: 20 May 2004 06:40:00 -0700
Organization: http://groups.google.com
Lines: 40
Message-ID: <4d201f78.0405200540.307bb15a@posting.google.com>
References: <4d201f78 DOT 0405181653 DOT 16a677b6 AT posting DOT google DOT com> <uoeok2abs DOT fsf AT gnu DOT org> <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> <u3c5vbous DOT fsf AT gnu DOT org>
NNTP-Posting-Host: 217.82.113.170
X-Trace: posting.google.com 1085060401 27134 127.0.0.1 (20 May 2004 13:40:01 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Thu, 20 May 2004 13:40:01 +0000 (UTC)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii <eliz AT gnu DOT org> wrote in message news:<u3c5vbous DOT fsf AT gnu DOT org>...
> > 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.

So any attempt to add support for native multitasking to the library itself
would also have to start from scratch. Well, it cannot be helped. :-/

> 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?

The documentation is not very detailed, but as I understand it, X_PCreate
creates a new process (or rather a new thread) in the same address room,
while Z_Dom_Fork copies the entire address room, which probably includes the
file handles of the calling process. I think that the processes will be
identical if the callers P_CREATE_PBLK is also used for the new domain's
root process, but of course one would have to verify these assumptions.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019