lkml.org 
[lkml]   [1996]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Core dumps & restarting
On 29 Oct 1996, H. Peter Anvin wrote:

> 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.
>

Wouldn't it be possible to just adjust all the pointers based on the new
memory location?
Simply compute the difference between the old and new... then adjust them
all.

-Chuck

s253343@gettysburg.edu
(717)-337-8212


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.091 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site