We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3fcd40 commit f87ac29Copy full SHA for f87ac29
memcached.c
@@ -4941,7 +4941,7 @@ static void remove_pidfile(const char *pid_file) {
4941
}
4942
4943
static void sig_handler(const int sig) {
4944
- printf("SIGINT handled.\n");
+ printf("Signal handled: %s.\n", strsignal(sig));
4945
exit(EXIT_SUCCESS);
4946
4947
@@ -5077,8 +5077,9 @@ int main (int argc, char **argv) {
5077
return EX_OSERR;
5078
5079
5080
- /* handle SIGINT */
+ /* handle SIGINT and SIGTERM */
5081
signal(SIGINT, sig_handler);
5082
+ signal(SIGTERM, sig_handler);
5083
5084
/* init settings */
5085
settings_init();
0 commit comments