2 * Copyright (C) 2018 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_TESTAPP_SIGNAL_HELPER_H
9 #define LTTNG_TESTAPP_SIGNAL_HELPER_H
14 static volatile int should_quit;
17 void sighandler(int sig)
25 int set_signal_handler()
28 struct sigaction sa {};
30 sa.sa_handler = sighandler;
32 ret = sigemptyset(&sa.sa_mask);
34 perror("sigemptyset");
38 ret = sigaction(SIGTERM, &sa, nullptr);
47 #endif /* LTTNG_TESTAPP_SIGNAL_HELPER_H */