Challange (was: Re: FFI vs. Plugins (was: CCD ..))

David T. Lewis lewis at mail.msen.com
Thu Sep 14 21:34:07 UTC 2000


> On Wed, 13 Sep 2000, David T. Lewis wrote:
> 
> > On Wed, Sep 13, 2000 at 08:16:59PM +0300, Mats Nygren wrote:
> > > 
> > > Or else be able to launch another Squeak process, hand over the image
> > > and then kill the old process, transparently excepting timing.
> > 
> > This can be done with UnixProcess>>restartVirtualMachine, part of the
> > OSProcess package, see http://minnow.cc.gatech.edu/squeak/708.
> 
> Does this really load a recompiled VM? AFAICT from the source it simply
> forks but does not exec() the new VM. This would require forkAndExec -
> although it probably is not possible to "hand over" the image in memory?

By golly, you're right. Who wrote this mess, anyhow? ;)

I think I originally did UnixProcess>>restartVirtualMachine just to
see if it could be done. It can, but I suppose that it's more entertaining
than useful in its current form.

Now that I'm dusting off my memory banks, I think that I once did a
method which snapshots the image prior to fork and exec of a (possibly
recompiled) VM. I'm away from my Squeak at the moment, so I won't try to
quote the code, but it was straightforward.

> Are you going to adapt the build instructions for Ian's new directory
> structure? 
> 
Yes. I'm short on time for testing and documenting it right now, but
you can either:

1) Put the plugin in ./src/unix/UnixOSProcessPlugin/UnixOSProcessPlugin.c,
make clean, ../src/unix/configure, make. This builds an external module.

-or-

2) Hack the Interpreter class>>translate:doInlining:forBrowserPlugin:
method to add UnixOSProcessPlugin (ugh!). Then translate a new
interp.c, configure, and make. This builds the plugin internally.

The next release of OSProcess will also split UnixOSProcessPlugin out
from the the UnixOSProcessAccessor class. Come to think of it, I don't
think I've released a version like that yet, so you may need to substitute
"UnixOSProcessAccessor" for "UnixOSProcessPlugin" in my instructions above.
I'll clean this up and reissue as soon as I get some free time (it might
be a few weeks).

Dave





More information about the Squeak-dev mailing list