reexecuting a killed program

William Sherman -Visualization wsherman at ncsa.uiuc.edu
Fri Dec 7 02:31:03 AEST 1990


I have two similar questions reguarding the reexecution of a program
whose state has been saved (core file or otherwise).  The reexecution
should start where the program left off, with all the variables and
memory intact.

Question 1:  Can (and how) one send a signal to a program causing
	a core dump that can later be run by rejoining the core with
	the executable (either through dbx or some other program).
	Are there any restrictions as to what a program can be in
	the process of doing when signaled?  I've tried sending
	a quit (signal 3), which produces a core dump, but dbx won't
	let me do a continue.

Question 2:  This one I know can be done, because Kyoto Common Lisp
	does it.  But after looking at the source, I wasn't able to
	decipher what was going on.  What I want is for a program
	to save itself, such that it creates an executable file which
	when run is basically in the same state as when saved.  KCL
	does this so that all the user data structures (and therefore
	functions) are exactly as they were.  In fact, the basic KCL
	executable has already had this done once.  So, to restate
	the problem: how does a program save itself into a file that
	simply needs to be executed for the user to be right back
	where he/she was when the program was saved.  (Note, actually
	terminating the program at this point is optional.)

--
/************************************************************************/
/* Bill Sherman								*/
/* National Center for Supercomputing Applications			*/
/* University of Illinois						*/
/* Champaign-Urbana							*/
/*									*/
/* Internet: wsherman at ncsa.uiuc.edu					*/
/*									*/
/*   "You want to do mankind a real service?  Tell funnier jokes."	*/
/* 		Og							*/
/************************************************************************/



More information about the Comp.unix.programmer mailing list