public inbox for
 help / color / mirror / Atom feed
From: Kevin Buettner <>
Subject: [PATCH] Ignore realitme signals.
Date: Tue, 20 Apr 2004 20:13:00 -0000	[thread overview]
Message-ID: <20040420131308.0f8af440@saguaro> (raw)

I've just committed the patch below.

The comment in the patch explains what it's about.  I've seen this
problem (in which rda terminates due to getting a signal intended for
one of the inferior threads and terminates) in at three different
environments now (all embedded linux, but different architectures). 
While I suspect that the real problem lies in the kernel, it certainly
doesn't hurt for RDA to ignore any real-time signals sent to it.

	* server.c (main): Ignore realtime signals.

Index: server.c
RCS file: /cvs/src/src/rda/unix/server.c,v
retrieving revision 1.4
diff -u -p -r1.4 server.c
--- server.c	19 Mar 2004 18:26:08 -0000	1.4
+++ server.c	20 Apr 2004 20:08:09 -0000
@@ -374,6 +374,17 @@ main (int argc, char **argv)
   signal (SIGCHLD, chld_handler);
+  {
+    int sig;
+    /* Ignore realtime signals.  We do this so as to not terminate
+       RDA if we inadvertently receive one of these signals.  The
+       realtime signals are used for thread support, and, for some
+       reason, some environments send these signals to RDA as well
+       as the application.  (And some don't.)  */
+    for (sig = SIGRTMIN; sig <= SIGRTMAX; sig++)
+      signal (sig, SIG_IGN);
+  }
   if (portno != 0)
       gdbsocket_startup (portno, gdbserver.attach, process);

             reply	other threads:[~2004-04-20 20:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-20 20:13 Kevin Buettner [this message]
2004-04-24 15:44 ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040420131308.0f8af440@saguaro \ \ \

* 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).