Comments

LP#1803182 Websocketd graceful shutdown support
Give websocketd clients a chance to complete any requests that are
in-process at time of shutdown.
Graceful shutdown is initiated by sending a SIGUSR1 signal to the
websocket-osrf child processes or to the parent process group.
This can be done directly via:
$ kill -s USR1 -$websocketd_parent_pid
Or via systemd for systemd users:
$ sudo systemctl kill -s USR1 websocketd-osrf
Note the websocketd parent process ignores SIGUSR1.
Once initiated, the websocketd backend goes into shutdown mode polling
for a graceful shutdown window, which occurs when all request up to now
have been completed. Once that moment arrives, the client is kicked off
and must connect to a new websocketd instance to issue any new requests.
The polling period lasts for SHUTDOWN_MAX_GRACEFUL_SECONDS seconds (in
osrf-websocket-stdio.c), which currently defaults to 2 minutes.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>