Messages in this thread | | | From | (H. Peter Anvin) | Subject | Re: Core dumps & restarting | Date | 29 Oct 1996 19:27:30 GMT |
| |
Followup to: <Pine.LNX.3.95.961028193059.22451A-100000@xeo.net> By author: psychos@xeo.net In newsgroup: linux.dev.kernel > > On Mon, 28 Oct 1996, Eduardo Diaz Comellas wrote: > > > Hi! > > > > I was wandering how to stop a process, reboot the machine, and > > restart that process. Is there a way to provoke a program to dump > > itself, and restart it after the reboot? > > > > Maybe we can define a new executable format for it to work ;-) > > > > Cheers! > > This would be practically impossible as you'd have to load the program > into the exact same memory space or all of its pointers would be bad... > Memory fragmentation issues would make it very hard to get any program to > occupy the exact same space it did before. >
Not at all. All the pointers are referring to virtual memory, which is customized for each process anyway. You can force a process to dump core by sending it a SIGQUIT; you can then use gdb to restart it, or use a program called "undump" to turn it into an executable. However, the program will have lost all file descriptors, so it needs to be written to accommodate that.
-hpa -- Not speaking for Transmeta in any shape, way, or form.
| |