caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Saving the state of the program ?
@ 1999-11-18 22:28 Benoit de Boursetty
  1999-11-19 14:01 ` Dave Mason
  0 siblings, 1 reply; 4+ messages in thread
From: Benoit de Boursetty @ 1999-11-18 22:28 UTC (permalink / raw)
  To: caml-list

Hi,

Does anyone know how to core-dump a running program, reboot, and then
restart the program from where it was ?

I suppose it is impossible when the program has, like, opened files or so,
but when it's just performing a computation with only stdin and stdout,
shouldn't it be possible ?

Thanks for your help
Benoît de Boursetty.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Saving the state of the program ?
  1999-11-18 22:28 Saving the state of the program ? Benoit de Boursetty
@ 1999-11-19 14:01 ` Dave Mason
  1999-11-21 13:47   ` Benoit de Boursetty
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Mason @ 1999-11-19 14:01 UTC (permalink / raw)
  To: caml-list

>>>>> On Thu, 18 Nov 1999 23:28:24 +0100 (MET), Benoit de Boursetty <debourse@email.enst.fr> said:

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

../Dave




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Saving the state of the program ?
  1999-11-19 14:01 ` Dave Mason
@ 1999-11-21 13:47   ` Benoit de Boursetty
  1999-11-22 13:45     ` Dave Mason
  0 siblings, 1 reply; 4+ messages in thread
From: Benoit de Boursetty @ 1999-11-21 13:47 UTC (permalink / raw)
  Cc: caml-list

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

Benoît de Boursetty





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Saving the state of the program ?
  1999-11-21 13:47   ` Benoit de Boursetty
@ 1999-11-22 13:45     ` Dave Mason
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Mason @ 1999-11-22 13:45 UTC (permalink / raw)
  To: caml-list

>>>>> 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")
	    (begin
		(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.

../Dave




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-11-22 17:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-18 22:28 Saving the state of the program ? Benoit de Boursetty
1999-11-19 14:01 ` Dave Mason
1999-11-21 13:47   ` Benoit de Boursetty
1999-11-22 13:45     ` Dave Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).