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.


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