Virtual machines (undump program)

Spencer W. Thomas thomas at utah-gr.UUCP
Thu Jan 10 13:00:48 AEST 1985


In article <7152 at brl-tgr.ARPA> BostonU SysMgr <root%bostonu.csnet at csnet-relay.arpa> writes:
>	We were distributed with our laser printer software a
>	UNIX (4.2 dependent probably) program called 'undump.c'
>	What it seems to do quite reliably is take a 'core'
>	and turn it back into an a.out which will start up as
>	it was at the time of the core dump (eg. after a SIGQUIT.)
>
>	I tried it on our EMACS and it almost works. EMACS certainly
>	starts up in the state it was dumped (EMACS goes through
>	a long, complicated and very necessary init phase.) The
>	obvious problem (here's the rub!) is that it won't re-read
>	the command line (argc,argv). 

Mea culpa!  I wrote undump a long time ago to help out the local lisp
folks.  Then I wrote a subroutine called unexec which takes a snapshot
of a running program.  Undump was originally written on 4.1, but was
ported to V7, at least (and probably others).  Unexec() is more
OS dependent, but has been ported to some other Unix versions (I think -
I've pretty much lost track of its evolution at this point).

Back when (Gosling) Emacs didn't have compiled mlisp, I converted our
emacs to use unexec.  I had to add "if (!Once){...}" to all the one-time
initialization code, but it worked fine after that.  I don't understand
the problem with not reading argc, argv again, unless the undump you got
is fancier than mine - I didn't save pc or stack, so you always
re-entered the program through main.  If yours saves full state, I might
be interested to see it.

In any case, if there is enough interest (time to get a bigger mailbox),
I can post both again (I did it once, but that was years ago).  (But I
can't post the emacs mods - they're long lost.)

-- 
=Spencer
	({ihnp4,decvax}!utah-cs!thomas, thomas at utah-cs.ARPA)
		<<< Silly quote of the week >>>



More information about the Comp.unix.wizards mailing list