Mail Archives: djgpp/2000/12/10/11:51:31
On Sun, 10 Dec 2000 08:34:17 +0200 (IST), Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> wrote:
>
>On 7 Dec 2000 cat AT animal DOT u-net DOT com wrote:
>
>> In the case of a program p2fork for example it might be possible
>> to save the state of the running version of the program to a data file
>> and then replicate the program with a line such as
>>
>> system("start /b p2fork --restart=data");
>
>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?
>> 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!
--
<O
( \ GNOME vs. KDE: the game!
X http://pineight.8m.com/nes.htm
This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses. http://www.mcafee.com/
- Raw text -