public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] signal: Avoid system signal disposition to interfere with tests Date: Mon, 1 Apr 2024 18:13:51 +0000 (GMT) [thread overview] Message-ID: <20240401181351.8826B3858D28@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2e53eb923486704b7a0d6f3d81d1ee8ba672a56b commit 2e53eb923486704b7a0d6f3d81d1ee8ba672a56b Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Wed Feb 14 17:33:41 2024 +0000 signal: Avoid system signal disposition to interfere with tests Both tst-sigset2 and tst-signal1 expectes that SIGINT disposition is set to SIG_DFL. Diff: --- signal/tst-sigset2.c | 4 ++++ sysdeps/pthread/tst-signal1.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/signal/tst-sigset2.c b/signal/tst-sigset2.c index 4eef653f95..c1d125e4cb 100644 --- a/signal/tst-sigset2.c +++ b/signal/tst-sigset2.c @@ -11,6 +11,8 @@ #include <sys/wait.h> #include <libc-diag.h> +#include <support/xsignal.h> + /* The sigset function is deprecated. */ DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations"); @@ -148,6 +150,8 @@ returnTest3 (void) int main (int argc, char *argv[]) { + xsignal (TEST_SIG, SIG_DFL); + pid_t childPid; childPid = fork(); diff --git a/sysdeps/pthread/tst-signal1.c b/sysdeps/pthread/tst-signal1.c index 1c550ef8eb..ca145eef3d 100644 --- a/sysdeps/pthread/tst-signal1.c +++ b/sysdeps/pthread/tst-signal1.c @@ -26,6 +26,7 @@ #include <sys/wait.h> #include <support/xunistd.h> +#include <support/xsignal.h> static sigset_t ss; static pthread_barrier_t *b; @@ -93,6 +94,8 @@ receiver (void) static int do_test (void) { + xsignal (SIGINT, SIG_DFL); + char tmp[] = "/tmp/tst-signal1-XXXXXX"; int fd = mkstemp (tmp);
reply other threads:[~2024-04-01 18:13 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240401181351.8826B3858D28@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).