🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #158

Re: help with unexec

#158
From: John Hascall
Date: Tue, 28 Jul 1992 15:10
31 lines
2341 bytes
net@cs.tu-berlin.de (Oliver Laumann) writes:
}dnicodem@cs.ulowell.edu (David Nicodemus) writes:
}> I am looking for a way to force a program out of execution, and save an
}> image of the program that can be restarted from the same point at a later
}> time. 
}> It appears that the gnu unexec() function from gnu emacs will do this;
}> however, the last parameter asks for a "starting address." 
}> How can I find this "starting address" (which I want to be the current
}> point of execution)?  Is this even possible?
}I'm not sure I understand what exactly you want to accomplish.  You
}certainly cannot *force* a program to dump its image to disk using
}unexec(); the program must call unexec() voluntarily.

I think perhaps what the original poster is looking for is a way to
checkpoint an arbitrary program -- say a machine has a long running job
on it and you need to shutdown.  Perhaps a related question is:
suppose you SIGQUIT the process to generate a core dump file, can you
devise a program which takes the original a.out file and the core file
and resumes the execution at the point where the SIGQUIT would return
as if it was SIG_IGNed?  Same values in all the registers, same memory
contents, files all re-opened and re-seeked, etc.  Perhaps some things
would be un-recreatable (inet sockets?), but if you got the essentials
down perhaps you could serve an important class of problems (how many
big Fortran number crunchers do sockets, not many I'll wager).

John
-- 
John Hascall                                       ``Live with it pink-boy!''
Project Vincent                                                              
Iowa State University Computation Center                     john@iastate.edu
Ames, IA  50011                                      515/294-9551 [fax -1717]
Technical Details
Message-ID: <1992Jul28.151000.2346@news.iastate.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!destroyer!news.iastate.edu!john
References: <1992Jul28.014955.21272@ulowell.ulowell.edu> <1992Jul28.100513.29858@cs.tu-berlin.de>

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.programmer,comp.unix.questions,gnu.misc.discuss,comp.unix.ultrix
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!destroyer!news.iastate.edu!john
From: john@iastate.edu (John Hascall)
Subject: Re: help with unexec
Message-ID: <1992Jul28.151000.2346@news.iastate.edu>
Sender: news@news.iastate.edu (USENET News System)
Organization: Iowa State University, Ames, IA
References: <1992Jul28.014955.21272@ulowell.ulowell.edu> <1992Jul28.100513.29858@cs.tu-berlin.de>
Date: Tue, 28 Jul 1992 15:10:00 GMT
Lines: 31