[racket] Closing down the web server

From: Norman Gray (norman at astro.gla.ac.uk)
Date: Sun Oct 7 14:27:38 EDT 2012

Greetings.

What's the recommended way of shutting down the Racket web server?

In the past, I've just killed the process -- *boom*!  This basically works (and would of course be perfectly all right in the case of a fully stateless service), but seems dangerously abrupt, and probably doesn't play nice with stateful things like database connections.

I can't find any guidance in the web-server manual.

I don't want to do anything too exotic, beyond shutting down a database connection, and exiting nice and neatly with a success status.

Is a will or custodian the right thing to use to do this cleanup, in the context of a process kill? (I confess to being rather uncertain about how to use either of those, but if I know where to start I can surely work it out).

Best wishes,

Norman


-- 
Norman Gray  :  http://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK



Posted on the users mailing list.