From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7350 invoked by alias); 20 Apr 2004 20:13:16 -0000 Mailing-List: contact rda-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: rda-owner@sources.redhat.com Received: (qmail 7341 invoked from network); 20 Apr 2004 20:13:15 -0000 Date: Tue, 20 Apr 2004 20:13:00 -0000 From: Kevin Buettner To: rda@sources.redhat.com Subject: [PATCH] Ignore realitme signals. Message-Id: <20040420131308.0f8af440@saguaro> Organization: Red Hat X-Mailer: Sylpheed version 0.9.8claws30 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-q2/txt/msg00001.txt.bz2 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);