[racket] Hosting the try-racket REPL.

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Mon Sep 22 02:52:30 EDT 2014

Amir Ansari wrote at 09/22/2014 02:28 AM:
> Have you tried Xvfb (http://en.wikipedia.org/wiki/Xvfb), a virtual X server? It runs headlessly, sidesteps the whole issue of having to fork the code...
>

I have no idea whether "xvfb" is the best way without looking closely at 
a particular case, but I've seen "xvfb" work in the past on production 
servers.  (Not for Racket, but for some R statistics tool that touched 
the X server, so that the tool could be used off-the-shelf, rather than 
maintaining a modified fork of the tool source.)

If you do this, just be write your startup and shutdown scripts to be 
resilient and stable (e.g., wrt available ports/sockets at the time, and 
to shut down cleanly, and so there are no race conditions or conflicts 
between multiple simultaneous users), and secure (e.g., ensure that it 
won't accidentally listen on a public network interface, and that an 
attacker can't synthesize operations to the xvfb to escalate privileges 
or DoS, and that the xvfb can't be used to leak data between users).

Neil V.


Posted on the users mailing list.