Date: Sun, 10 Dec 2000 20:30:12 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-Id: <7263-Sun10Dec2000203012+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 In-reply-to: <8ab73tcgn9f63eqo7k6ed45dh5472mnj9e@4ax.com> (message from Damian Yerrick on Sun, 10 Dec 2000 16:22:16 GMT) Subject: Re: function fork() References: <3a2fe050$1 AT news DOT gemsoft DOT net> <8ab73tcgn9f63eqo7k6ed45dh5472mnj9e AT 4ax 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: Damian Yerrick > Newsgroups: comp.os.msdos.djgpp > Date: Sun, 10 Dec 2000 16:22:16 GMT > > > >Note that restarting a program from a disk file is not an easy task. You > >cannot let start.exe (which is a stock Windows program) do that, because > >it doesn't understand the structure of the file to which you write the > >memory image of the running program. If you want p2fork itself do that, > >it needs to include code that can read a file into memory, set up an > >execution environment expected by DJGPP programs (segment registers, > >memory arena--stack and heap--, exception handlers, etc.), then release > >its own memory and other resources, and jump into the code it read from > >disk. > > In other words, create and load a "continuation," right? Yes. > >> It may be necessary to modify the .pif for p2fork after it has been > >> invoked to make it keep using CPU time when running in background mode. > > > >I think this isn't required. It suffices to change the properties of the > >DOS box to not suspend in background. The DOS box properties are used by > >default for each DOS program that doesn't have a PIF file of its own. > > The DOS box properties _are_ a PIF file. Let's see... I compile Hello > World with DJGPP, edit the DOS box properties, and type `ls'... > ...wow, a PIF file! Sure, properties are stored on a PIF file. My point was that you don't need an individual PIF file for each program, you can change that globally by modifying the properties of the DOS box. (Is there any reason you won't want ALL DJGPP programs to be active in background?)