English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Saving the state of the program ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-11-22 (17:33)
From: Dave Mason <dmason@s...>
Subject: Re: Saving the state of the program ?
>>>>> On Sun, 21 Nov 1999 14:47:56 +0100 (MET), Benoit de Boursetty <debourse@email.enst.fr> said:

> On Fri, 19 Nov 1999, Dave Mason wrote:
>> > Hi, Does anyone know how to core-dump a running program, reboot,
>> > and then restart the program from where it was ?
>> Emacs does that.  Basically they do a core dump and then have a
>> (somewhat system dependent) unexec routine that turns the core file
>> into an executable.
>> The scm scheme system uses this, too.  That's probably the best
>> place to look.

> Thanks for the info. However, my question was about executables in
> the general case...

That's what I was trying to point you to.  In scm you can say something like:
	(if (dump "new-executable")
		(display "\"new-executable\" successfully made\n")
		(exit 0)))
	...rest of the program...

It wouldn't be too hard to pull the code out of scm and add it to the
ocaml library.  But it would rewuire some C coding experience.