[plt-scheme] sandbox & ports closed prematurely

From: Tom Schouten (tom at zwizwa.be)
Date: Tue Jul 1 08:06:26 EDT 2008

On Tue, Jul 01, 2008 at 07:57:20AM -0400, Eli Barzilay wrote:
> On Jul  1, Tom Schouten wrote:
> > Hello,
> > 
> > I ran into strange sandbox evaluator behaviour where an output port gets closed immediately, 
> > instead of at evaluator destruction time:
> > 
> > Welcome to MzScheme v4.0.1.3 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.
> > > (require scheme/sandbox)
> > > (sandbox-security-guard (current-security-guard))
> > > (define e (make-evaluator 'scheme/base))
> > > (define f (e '(open-output-file "/tmp/bla")))
> > > (display 123 f)
> > display: output port is closed
> 
> The default is a little paranoid: every evaluation is performed with a
> time and a space limit, which means running under a temporay
> custodian.  If you add (sandbox-eval-limits #f) then this will not
> happen.

Thanks.
I suppose there's no easy way to have it both?
Can a custodian be made to ignore I/O ports, and let them be handled by its parent?


Posted on the users mailing list.