Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: dje@google.com (Doug Evans)
To: gdb-patches@sourceware.org
Subject: [RFA] make gdb.base/sigall.c more robust
Date: Thu, 17 Jan 2008 23:32:00 -0000	[thread overview]
Message-ID: <20080117233141.5FAA51C7247@localhost> (raw)

One environment in which I run the gdb testsuite has a few signals blocked
at the start.  If tcl/expect/bash had the ability to unblock signals it might
be preferable to unblock the signals there (I couldn't find any),
but OTOH testcases should be reasonably robust.

2008-01-17  Doug Evans  <dje@google.com>

	* gdb.base/sigall.c (main): Ensure all signals aren't blocked.

Index: sigall.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sigall.c,v
retrieving revision 1.1.1.2
diff -u -p -u -p -r1.1.1.2 sigall.c
--- sigall.c	28 Jun 1999 16:04:02 -0000	1.1.1.2
+++ sigall.c	17 Jan 2008 23:18:55 -0000
@@ -1581,6 +1581,18 @@ main ()
   set_debug_traps ();
   breakpoint ();
 #endif
+
+#ifdef SIG_SETMASK
+  /* Ensure all the signals aren't blocked.
+     The environment in which the testsuite is run may have blocked some
+     for whatever reason.  */
+  {
+    sigset_t newset;
+    sigemptyset (&newset);
+    sigprocmask (SIG_SETMASK, &newset, NULL);
+  }
+#endif
+
   signal (SIGABRT, handle_ABRT);
 #ifdef SIGHUP
   signal (SIGHUP, handle_HUP);


             reply	other threads:[~2008-01-17 23:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17 23:32 Doug Evans [this message]
2008-01-28 23:51 ` Doug Evans
2008-01-30  1:02 ` Daniel Jacobowitz

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=20080117233141.5FAA51C7247@localhost \
    --to=dje@google.com \
    --cc=gdb-patches@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: link
Be 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