On 2007-06-16, Peter Brooks <Peter.H.M.Brooks@[EMAIL PROTECTED]
> wrote:
> I imagine that this is probably platform dependent. What I'd like to
> do, though, is to run a program and save its state, so that, when it
> is run again, it starts where it left off, even if the machine has
> been re-booted between times.
Then you would have to freeze the entire program and kernel. Which is
awfully hard. (also part of the kernel state, since at the moment of
freezing the program could be communicating with the kernel, though
probably
some very small limitations could solve that).
The classic solution under Unix is a core dump of a process. (a dump of
the
memory). IIRC EMacs distribution used to be based on it. (startup, then
coredump, and then always start the coredump, saving the LISP startup
overhead).
> Is there a platform independent way of doing this? Or, maybe more
> sensibly, are there equivalent ways of doing this in various systems
> that can be set with compile switches?
No. This is kernel stuff, so you will probably need a way to tell the
kernel
to dump/reload a process from/to a dump. But this is an black art, not
something simple.


|