[racket-dev] Sandboxed evaluations throwing error from command line, but not from DrRacket

From: Ryan C (atwopiecepuzzle at gmail.com)
Date: Mon Aug 11 16:30:42 EDT 2014

Howdy all,

I've been having an issue with sandboxed evaluations when requiring certain
libraries, such as pict or 2htdp/image. I create a module evaluator and
provide #:allow-for-require '(pict 2htdp/image etc.). I have this wrapped
in a hand-in server type setup. When I start servlet.rkt in DrRacket,
everything runs hunky-dory. When I run "racket servlet.rkt", the server
spins up fine but when I try "(require pict) (circle 10)" (which works on
the DrRacket-initialized one) I get an exception stating that file-read
access 'exists' denied for C:\...(current directory)\racket.exe. Then I
tried adding (current-directory) to the #:allow-read list, and it complains
about C:\Python\racket.exe. If I continue allowing read paths, I see it
effectively scans a ton of folders looking for this executable. Yet, when
the servlet is started from DrRacket, this is never an issue. Any idea what
the source of this discrepancy might be?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20140811/99e3caee/attachment.html>

Posted on the dev mailing list.