diff options
author | Tomas Korbar <tkorbar@redhat.com> | 2020-05-07 08:36:10 +0200 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2020-05-12 18:48:46 -0700 |
commit | 21f65e532b7401f3c5476f50a026b2dab0900315 (patch) | |
tree | 64f220c2eb64854f1bdbbcbf3c6610e3bd8b4b6e /memcached.h | |
parent | 7554dc78225b4c501e97f56b69f1b5a8eebb5d9f (diff) | |
download | memcached-21f65e532b7401f3c5476f50a026b2dab0900315.tar.gz |
Improve the sig_handler function
Add new enumeration with reasons for stopping memcached.
Make sure that restart_mmap_close gets called only when the right
signal is received.
Improve logging to stderr so user knows why exactly memcached
stopped.
Diffstat (limited to 'memcached.h')
-rw-r--r-- | memcached.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/memcached.h b/memcached.h index fe53afb..3254afa 100644 --- a/memcached.h +++ b/memcached.h @@ -233,6 +233,12 @@ enum pause_thread_types { RESUME_WORKER_THREADS }; +enum stop_reasons { + NOT_STOP, + GRACE_STOP, + EXIT_NORMALLY +}; + #define IS_TCP(x) (x == tcp_transport) #define IS_UDP(x) (x == udp_transport) |