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
13 static volatile int should_quit;
16 void sighandler(int sig)
24 int set_signal_handler(void)
27 struct sigaction sa {};
29 sa.sa_handler = sighandler;
31 ret = sigemptyset(&sa.sa_mask);
33 perror("sigemptyset");
37 ret = sigaction(SIGTERM, &sa, NULL);
46 #endif /* LTTNG_TESTAPP_SIGNAL_HELPER_H */