home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / programm / 3959 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  2.4 KB

  1. Xref: sparky comp.unix.programmer:3959 comp.unix.questions:9487 gnu.misc.discuss:2564 comp.unix.ultrix:5931
  2. Newsgroups: comp.unix.programmer,comp.unix.questions,gnu.misc.discuss,comp.unix.ultrix
  3. Path: sparky!uunet!caen!destroyer!news.iastate.edu!john
  4. From: john@iastate.edu (John Hascall)
  5. Subject: Re: help with unexec
  6. Message-ID: <1992Jul28.151000.2346@news.iastate.edu>
  7. Sender: news@news.iastate.edu (USENET News System)
  8. Organization: Iowa State University, Ames, IA
  9. References: <1992Jul28.014955.21272@ulowell.ulowell.edu> <1992Jul28.100513.29858@cs.tu-berlin.de>
  10. Date: Tue, 28 Jul 1992 15:10:00 GMT
  11. Lines: 31
  12.  
  13. net@cs.tu-berlin.de (Oliver Laumann) writes:
  14. }dnicodem@cs.ulowell.edu (David Nicodemus) writes:
  15. }> I am looking for a way to force a program out of execution, and save an
  16. }> image of the program that can be restarted from the same point at a later
  17. }> time. 
  18. }> It appears that the gnu unexec() function from gnu emacs will do this;
  19. }> however, the last parameter asks for a "starting address." 
  20. }> How can I find this "starting address" (which I want to be the current
  21. }> point of execution)?  Is this even possible?
  22. }I'm not sure I understand what exactly you want to accomplish.  You
  23. }certainly cannot *force* a program to dump its image to disk using
  24. }unexec(); the program must call unexec() voluntarily.
  25.  
  26. I think perhaps what the original poster is looking for is a way to
  27. checkpoint an arbitrary program -- say a machine has a long running job
  28. on it and you need to shutdown.  Perhaps a related question is:
  29. suppose you SIGQUIT the process to generate a core dump file, can you
  30. devise a program which takes the original a.out file and the core file
  31. and resumes the execution at the point where the SIGQUIT would return
  32. as if it was SIG_IGNed?  Same values in all the registers, same memory
  33. contents, files all re-opened and re-seeked, etc.  Perhaps some things
  34. would be un-recreatable (inet sockets?), but if you got the essentials
  35. down perhaps you could serve an important class of problems (how many
  36. big Fortran number crunchers do sockets, not many I'll wager).
  37.  
  38. John
  39. -- 
  40. John Hascall                                       ``Live with it pink-boy!''
  41. Project Vincent                                                              
  42. Iowa State University Computation Center                     john@iastate.edu
  43. Ames, IA  50011                                      515/294-9551 [fax -1717]
  44.