14.11Plumbers

A plumber supports flush callbacks, which are
normally triggered just before a Racket process or place exits.
For example, a flush callback might flush an output port’s
buffer.

Flush callbacks are roughly analogous to the standard C
library’s atexit, but flush callback can also be used in other,
similar scenarios.

There is no guarantee that a flush callback will be called before a
process terminates—either because the plumber is not the original
plumber that is flushed by the default exit handler, or because
the process is terminated forcibly (e.g., through a custodian
shutdown).