9#ifndef __CWIST_SHUTDOWN_H__
10#define __CWIST_SHUTDOWN_H__
17#ifndef CWIST_PLATFORM_NO_PROC
int g_cwist_drain_timeout_sec
Drain timeout in seconds before process exits.
void cwist_shutdown_request(void)
Request a graceful shutdown, as SIGTERM/SIGINT do: clear the running flag and shut down the listening...
int g_cwist_listen_fd
Registered TCP listening socket (for signal-handler closure).
atomic_int g_cwist_running
Global running flag. Checked by all server event loops.
void cwist_shutdown_install_handlers(void)
Install SIGTERM and SIGINT handlers for graceful shutdown.
void cwist_shutdown_restore_handlers(void)
Put back the SIGTERM and SIGINT handlers that were in place before cwist_shutdown_install_handlers()....
int g_cwist_udp_fd
Registered UDP socket for HTTP/3 (for signal-handler closure).
void cwist_shutdown_reset(void)
Reset shutdown state (useful in test suites).