Awesome - thanks! I wonder if using serve, instead of serve/servlet, may 
also avoid the extra functionality described in "Stateless Servlets" that I 
mentioned in another thread here:!topic/racket-users/fc0mRI-empE

On Friday, November 30, 2018 at 1:57:00 PM UTC-5, Bogdan Popa wrote:
> Brian Adkins writes: 
> > I just did a quick test, and "kill <pid>" will stop the Racket web 
> server, 
> > but not gracefully. In other words, it doesn't allow the current request 
> to 
> > finish. Maybe another signal will gracefully stop it? 
> I personally run the server with serve[1] which runs it in a background 
> thread and I keep a reference to the returned stopper function and 
> finally do something along the lines of 
>     (with-handlers ([exn:break? (lambda (e) (stopper))]) 
>       (sync/enable-break never-evt)) 
> in my main thread.  As I understand it[2], exn:break? will be truthy for 
> SIGINT, SIGTERM and SIGHUP (though there are also the exn:break:hang-up? 
> and exn:break:terminate? predicates) on UNIX, so this should "catch" all 
> of those and gracefully terminate my server. 
> [1]: 
> [2]: 

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to