Core files ... it works

Leo de Wit leo at philmds.UUCP
Mon Jul 4 21:09:39 AEST 1988


How about using setjmp() and longjmp()? Isn't that a - fairly - portable way
to get/restores the registers?

Something like:

     if (setjmp(&jpbf)) {
         /* save jmpbuf struct into data space of new executable */
     } else { /* */
     }

When running the executable, do a longjmp using the saved struct.
This can of course cause problems (longjmp complaining about an incorrect
stack) on systems where longjmp does such checkings (did Chris not mention
something like this in a recent posting?).

Anyway, it was just an idea...

   Leo.



More information about the Comp.unix.questions mailing list