From eb8dd9dca1228af0cd132f515509051ecfabf6f6 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Mon, 14 Apr 2025 17:32:06 +0000 Subject: This commit was manufactured by cvs2git to create tag 'tb_20250414'. --- src/regress/lib/libc/sigthr/Makefile | 5 --- src/regress/lib/libc/sigthr/sigthr_test.c | 66 ------------------------------- 2 files changed, 71 deletions(-) delete mode 100644 src/regress/lib/libc/sigthr/Makefile delete mode 100644 src/regress/lib/libc/sigthr/sigthr_test.c (limited to 'src/regress/lib/libc/sigthr') diff --git a/src/regress/lib/libc/sigthr/Makefile b/src/regress/lib/libc/sigthr/Makefile deleted file mode 100644 index 8ae4643e1e..0000000000 --- a/src/regress/lib/libc/sigthr/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $OpenBSD: Makefile,v 1.1 2015/10/22 05:30:18 guenther Exp $ - -PROG=sigthr_test - -.include diff --git a/src/regress/lib/libc/sigthr/sigthr_test.c b/src/regress/lib/libc/sigthr/sigthr_test.c deleted file mode 100644 index c2eaa1f779..0000000000 --- a/src/regress/lib/libc/sigthr/sigthr_test.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2015 Philip Guenther - * - * Public domain. - * - * Verify that SIGTHR can't be blocked or caught by applications. - */ - -#include -#include -#include -#include -#include -#include - -void sighandler(int sig) { } - -int -main(void) -{ - struct sigaction sa; - sigset_t set, oset; - - /* - * check sigprocmask - */ - if (sigprocmask(SIG_BLOCK, NULL, &set)) - err(1, "sigprocmask"); - if (sigismember(&set, SIGTHR)) - errx(1, "SIGTHR already blocked"); - sigaddset(&set, SIGTHR); - if (sigprocmask(SIG_BLOCK, &set, NULL)) - err(1, "sigprocmask"); - if (sigprocmask(SIG_SETMASK, &set, &oset)) - err(1, "sigprocmask"); - if (sigismember(&oset, SIGTHR)) - errx(1, "SIGTHR blocked with SIG_BLOCK"); - if (sigprocmask(SIG_BLOCK, NULL, &oset)) - err(1, "sigprocmask"); - if (sigismember(&oset, SIGTHR)) - errx(1, "SIGTHR blocked with SIG_SETMASK"); - - /* - * check sigaction - */ - if (sigaction(SIGTHR, NULL, &sa) == 0) - errx(1, "sigaction(SIGTHR) succeeded"); - else if (errno != EINVAL) - err(1, "sigaction(SIGTHR) didn't fail with EINVAL"); - memset(&sa, 0, sizeof sa); - sa.sa_handler = sighandler; - sigfillset(&sa.sa_mask); - sa.sa_flags = 0; - if (sigaction(SIGTHR, &sa, NULL) == 0) - errx(1, "sigaction(SIGTHR) succeeded"); - else if (errno != EINVAL) - err(1, "sigaction(SIGTHR) didn't fail with EINVAL"); - if (sigaction(SIGUSR1, &sa, NULL)) - err(1, "sigaction(SIGUSR1)"); - if (sigaction(SIGUSR1, NULL, &sa)) - err(1, "sigaction(SIGUSR1)"); - if (sigismember(&sa.sa_mask, SIGTHR)) - errx(1, "SIGTHR blocked with sigaction"); - - return 0; -} -- cgit v1.2.3-55-g6feb