From 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 29 Apr 2024 06:41:38 +0200 Subject: Adding upstream version 1.0.1. Signed-off-by: Daniel Baumann --- test cases/unit/109 freeze/freeze.c | 21 +++++++++++++++++++++ test cases/unit/109 freeze/meson.build | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 test cases/unit/109 freeze/freeze.c create mode 100644 test cases/unit/109 freeze/meson.build (limited to 'test cases/unit/109 freeze') diff --git a/test cases/unit/109 freeze/freeze.c b/test cases/unit/109 freeze/freeze.c new file mode 100644 index 0000000..0a45c1a --- /dev/null +++ b/test cases/unit/109 freeze/freeze.c @@ -0,0 +1,21 @@ +#include +#include +#include +#include + +static void do_nothing(int signo, siginfo_t *info, void *context) { +} + +int main(int argc, char **argv) { + struct sigaction sa; + memset(&sa, 0, sizeof(struct sigaction)); + sa.sa_sigaction = do_nothing; + if (sigaction(SIGTERM, &sa, NULL) == -1) { + printf("Could not set up signal handler.\n"); + return 1; + } + printf("Freezing forever.\n"); + while(1) { + } + return 0; +} diff --git a/test cases/unit/109 freeze/meson.build b/test cases/unit/109 freeze/meson.build new file mode 100644 index 0000000..1a84f37 --- /dev/null +++ b/test cases/unit/109 freeze/meson.build @@ -0,0 +1,4 @@ +project('freeze', 'c') + +e = executable('freeze', 'freeze.c') +test('freeze', e, timeout: 1) -- cgit v1.2.3