From 2234450b81e3451a3e14686e80e13e66cf6d2a4a Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Thu, 26 Jul 2018 00:03:15 +0300 Subject: Test on old ubuntu --- samples/echobot-webhook-server/src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'samples/echobot-webhook-server') diff --git a/samples/echobot-webhook-server/src/main.cpp b/samples/echobot-webhook-server/src/main.cpp index 7b5776a..d51246d 100644 --- a/samples/echobot-webhook-server/src/main.cpp +++ b/samples/echobot-webhook-server/src/main.cpp @@ -26,6 +26,11 @@ int main() { bot.getApi().sendMessage(message->chat->id, "Your message is: " + message->text); }); + signal(SIGINT, [](int s) { + printf("SIGINT got\n"); + exit(0); + }); + try { printf("Bot username: %s\n", bot.getApi().getMe()->username.c_str()); -- cgit v1.2.3