[comp.lang.perl] unexec on suns

jsb@cs.brown.edu (John Bazik) (02/20/91)

Has anyone out there successfully incorporated gnuemac's unexec routine
into perl using Tom Christiansen's hook (in pl38 and later) on a Sun4?

I've tried, but, apparently, I didn't hook it up right to perl.

What I tried was to pick out the sun4-specific parts of crt0.c from the
gnu code and load that first (along with unexec.o, of course) when I build
perl.  The result compiles and loads but does nothing when I use the -u
switch.

If you've done it, please tell me how!

Alternatively, if anyone has an undump that works on sun4s with perl, I'd
love to hear of it.

John Bazik
jsb@cs.brown.edu

tchrist@convex.COM (Tom Christiansen) (02/20/91)

From the keyboard of jsb@cs.brown.edu (John Bazik):
:Has anyone out there successfully incorporated gnuemac's unexec routine
:into perl using Tom Christiansen's hook (in pl38 and later) on a Sun4?
:
:I've tried, but, apparently, I didn't hook it up right to perl.
:
:What I tried was to pick out the sun4-specific parts of crt0.c from the
:gnu code and load that first (along with unexec.o, of course) when I build
:perl.  The result compiles and loads but does nothing when I use the -u
:switch.

does nothing -- why don't you open /dev/tty and trying writing there.
i'm not sure that fd's 0, 1, and 2 are in a good state when you come back.

they certainly aren't if you use undump (unless you don't really call abort()).

:Alternatively, if anyone has an undump that works on sun4s with perl, I'd
:love to hear of it.

I got a new undump that works on Sun3's at 4.1 iff you change
the abort in perl to kill(getpid(), SIG_ILL) as God intended 
it to be. :-)  Haven't tried it on sun4's yet.

--tom
--
Tom Christiansen		tchrist@convex.com	convex!tchrist
 "All things are possible, but not all expedient."  (in life, UNIX, and perl)