Rename C++ header files to .hpp
[lttng-tools.git] / tests / utils / testapp / signal-helper.h
diff --git a/tests/utils/testapp/signal-helper.h b/tests/utils/testapp/signal-helper.h
deleted file mode 100644 (file)
index ceadcb3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2018 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * SPDX-License-Identifier: LGPL-2.1-only
- *
- */
-
-#ifndef LTTNG_TESTAPP_SIGNAL_HELPER_H
-#define LTTNG_TESTAPP_SIGNAL_HELPER_H
-
-#include <signal.h>
-
-static volatile int should_quit;
-
-static
-void sighandler(int sig)
-{
-       if (sig == SIGTERM) {
-               should_quit = 1;
-       }
-}
-
-static
-int set_signal_handler(void)
-{
-       int ret;
-       struct sigaction sa {};
-       sa.sa_flags = 0;
-       sa.sa_handler = sighandler;
-
-       ret = sigemptyset(&sa.sa_mask);
-       if (ret) {
-               perror("sigemptyset");
-               goto end;
-       }
-
-       ret = sigaction(SIGTERM, &sa, NULL);
-       if (ret) {
-               perror("sigaction");
-               goto end;
-       }
-end:
-       return ret;
-}
-
-#endif /* LTTNG_TESTAPP_SIGNAL_HELPER_H */
This page took 0.02344 seconds and 4 git commands to generate.