Tomáš Pecka | d033707 | 2021-01-25 19:57:00 +0100 | [diff] [blame] | 1 | /* |
2 | * Copyright (C) 2021 CESNET, https://photonics.cesnet.cz/ | ||||
3 | * | ||||
4 | * Written by Václav Kubernát <kubernat@cesnet.cz> | ||||
5 | * | ||||
6 | */ | ||||
7 | |||||
8 | #include <csignal> | ||||
9 | #include <spdlog/spdlog.h> | ||||
10 | #include <unistd.h> | ||||
11 | #include "waitUntilSignalled.h" | ||||
12 | |||||
13 | void waitUntilSignaled() | ||||
14 | { | ||||
15 | signal(SIGTERM, [](int) {}); | ||||
16 | signal(SIGINT, [](int) {}); | ||||
17 | pause(); | ||||
18 | spdlog::get("main")->debug("Shutting down"); | ||||
19 | } |