[racket-dev] results of dlopen (hence ffi) persistent across evaluations?

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Aug 6 17:24:23 EDT 2010

On Aug  6, Sam Tobin-Hochstadt wrote:
> On Fri, Aug 6, 2010 at 5:20 PM, Eli Barzilay <eli at barzilay.org> wrote:
> > On Aug  6, John Clements wrote:
> >> On Aug 6, 2010, at 3:28 PM, Eli Barzilay wrote:
> >>
> >> > BTW, IIRC, there is a way to load a new copy of a library, but that
> >> > could be pretty bad.  Alternatively, there's probably a way to unload
> >> > a library, so perhaps this could be hacked -- somehow voiding all
> >> > references to code from it.  But I'm not sure if there's a sane way to
> >> > do that so other things don't break.  (Where breaking could also be
> >> > reloading a library over and over.)
> >>
> >> Sounds reasonable.  May I add this text to the docs for ffi-lib? :
> >>
> >> Note! On UNIX-based platforms, loaded libraries are associated with
> >> Racket or DrRacket for the duration of the process; re-evaluating
> >> ffi-lib will not force a re-load of the corresponding library.
> >
> > Sure -- with a minor change -- remove unix-based, since it's the same
> > on windows.
> 
> I would also remove the reference to DrRacket, since it isn't relevant here.

There's still a point in keeping it -- since it's the most obvious
environment where people expect run to clear the world.  (Maybe also
extending it later to running code in a sandbox etc.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.